m3e/floating_panel
FloatingPanel is a lightweight, generic floating surface used to present content above the page.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy,
fit_anchor_width: FitAnchorWidth,
anchor_offset: Float,
)
}
Constructors
-
Config( scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy, fit_anchor_width: FitAnchorWidth, anchor_offset: Float, )
FitAnchorWidth is whether the panel’s width should match its anchor’s width.
pub type FitAnchorWidth {
IsFitAnchorWidth
IsNotFitAnchorWidth
}
Constructors
-
IsFitAnchorWidth -
IsNotFitAnchorWidth
FloatingPanel is a View Model for this component
Fields:
- scroll_strategy: The strategy that controls how the panel behaves when its trigger scrolls.
- fit_anchor_width: Whether the panel’s width should match its anchor’s width.
- anchor_offset: The logical margin, in pixels, between the panel and its anchor.
pub opaque type FloatingPanel
Values
pub fn anchor_offset(
record: FloatingPanel,
anchor_offset: Float,
) -> FloatingPanel
anchor_offset sets the value of anchor_offset for this FloatingPanel.
pub const default_anchor_offset: Float
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_fit_anchor_width: FitAnchorWidth
pub const default_scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy
pub fn fit_anchor_width(
record: FloatingPanel,
fit_anchor_width: FitAnchorWidth,
) -> FloatingPanel
fit_anchor_width sets the value of fit_anchor_width for this FloatingPanel.
pub fn from_config(config: Config) -> FloatingPanel
from_config creates a new FloatingPanel from the given configuration.
pub fn new() -> FloatingPanel
new creates a new FloatingPanel with the default configuration.
pub fn render(
model: FloatingPanel,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a FloatingPanel
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a FloatingPanel Config
pub fn scroll_strategy(
record: FloatingPanel,
scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy,
) -> FloatingPanel
scroll_strategy sets the value of scroll_strategy for this FloatingPanel.