m3e/bottom_sheet
BottomSheet is a sheet used to show secondary content anchored to the bottom of the screen.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
BottomSheet is a View Model for this component
Fields:
- detent: The zero‑based index of the detent the sheet should open to.
- detents: Detents (discrete height states) the sheet can snap to.
- handle: Whether to display a drag handle and enable the top region of the sheet as a gesture surface for dragging between detents.
- handle_label: The accessible label given to the drag handle.
- hideable: Whether the bottom sheet can hide when its swiped down.
- hide_friction: The friction coefficient to hide the sheet.
- modal: Whether the bottom sheet behaves as modal.
- open: Whether the bottom sheet is open.
- overshoot_limit: A fractional value, between 0 and 100, indicating the maximum visual overshoot allowed when dragging past the minimum or maximum size.
pub opaque type BottomSheet
Handle is whether to display a drag handle and enable the top region of the sheet as a gesture surface for dragging between detents.
pub type Handle {
IsHandle
IsNotHandle
}
Constructors
-
IsHandle -
IsNotHandle
Hideable is whether the bottom sheet can hide when its swiped down.
pub type Hideable {
IsHideable
IsNotHideable
}
Constructors
-
IsHideable -
IsNotHideable
Modal is whether the bottom sheet behaves as modal.
pub type Modal {
IsModal
IsNotModal
}
Constructors
-
IsModal -
IsNotModal
Open is whether the bottom sheet is open.
pub type Open {
IsOpen
IsNotOpen
}
Constructors
-
IsOpen -
IsNotOpen
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_detent: Float
pub const default_detents: List(String)
pub const default_handle: Handle
pub const default_handle_label: String
pub const default_hide_friction: Float
pub const default_hideable: Hideable
pub const default_modal: Modal
pub const default_open: Open
pub const default_overshoot_limit: Float
pub fn detent(record: BottomSheet, detent: Float) -> BottomSheet
detent sets the value of detent for this BottomSheet.
pub fn detents(
record: BottomSheet,
detents: List(String),
) -> BottomSheet
detents sets the value of detents for this BottomSheet.
pub fn from_config(config: Config) -> BottomSheet
from_config creates a new BottomSheet from the given configuration.
pub fn handle(record: BottomSheet, handle: Handle) -> BottomSheet
handle sets the value of handle for this BottomSheet.
pub fn handle_label(
record: BottomSheet,
handle_label: String,
) -> BottomSheet
handle_label sets the value of handle_label for this BottomSheet.
pub fn hide_friction(
record: BottomSheet,
hide_friction: Float,
) -> BottomSheet
hide_friction sets the value of hide_friction for this BottomSheet.
pub fn hideable(
record: BottomSheet,
hideable: Hideable,
) -> BottomSheet
hideable sets the value of hideable for this BottomSheet.
pub fn modal(record: BottomSheet, modal: Modal) -> BottomSheet
modal sets the value of modal for this BottomSheet.
pub fn open(record: BottomSheet, open: Open) -> BottomSheet
open sets the value of open for this BottomSheet.
pub fn overshoot_limit(
record: BottomSheet,
overshoot_limit: Float,
) -> BottomSheet
overshoot_limit sets the value of overshoot_limit for this BottomSheet.
pub fn render(
model: BottomSheet,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a BottomSheet
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 BottomSheet Config
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name