# 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

opaque </>

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

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        detent: Float,
        detents: List(String),
        handle: Handle,
        handle_label: String,
        hideable: Hideable,
        hide_friction: Float,
        modal: Modal,
        open: Open,
        overshoot_limit: Float,
      )
    }

### Constructors

-     Config(
        detent: Float,
        detents: List(String),
        handle: Handle,
        handle_label: String,
        hideable: Hideable,
        hide_friction: Float,
        modal: Modal,
        open: Open,
        overshoot_limit: Float,
      )

## Handle

</>

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

</>

Hideable is whether the bottom sheet can hide when its swiped down.

    pub type Hideable {
      IsHideable
      IsNotHideable
    }

### Constructors

-     IsHideable

-     IsNotHideable

## Modal

</>

Modal is whether the bottom sheet behaves as modal.

    pub type Modal {
      IsModal
      IsNotModal
    }

### Constructors

-     IsModal

-     IsNotModal

## Open

</>

Open is whether the bottom sheet is open.

    pub type Open {
      IsOpen
      IsNotOpen
    }

### Constructors

-     IsOpen

-     IsNotOpen

## Slot

</>

Slots are used in child elements to insert content into this component

    pub type Slot {
      Header
    }

### Constructors

-     Header

# Values

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_detent

</>

    pub const default_detent: Float

## default_detents

</>

    pub const default_detents: List(String)

## default_handle

</>

    pub const default_handle: Handle

## default_handle_label

</>

    pub const default_handle_label: String

## default_hide_friction

</>

    pub const default_hide_friction: Float

## default_hideable

</>

    pub const default_hideable: Hideable

## default_modal

</>

    pub const default_modal: Modal

## default_open

</>

    pub const default_open: Open

## default_overshoot_limit

</>

    pub const default_overshoot_limit: Float

## detent

</>

    pub fn detent(record: BottomSheet, detent: Float) -> BottomSheet

detent sets the value of detent for this BottomSheet.

## detents

</>

    pub fn detents(
      record: BottomSheet,
      detents: List(String),
    ) -> BottomSheet

detents sets the value of detents for this BottomSheet.

## from_config

</>

    pub fn from_config(config: Config) -> BottomSheet

from_config creates a new BottomSheet from the given configuration.

## handle

</>

    pub fn handle(record: BottomSheet, handle: Handle) -> BottomSheet

handle sets the value of handle for this BottomSheet.

## handle_label

</>

    pub fn handle_label(
      record: BottomSheet,
      handle_label: String,
    ) -> BottomSheet

handle_label sets the value of handle_label for this BottomSheet.

## hide_friction

</>

    pub fn hide_friction(
      record: BottomSheet,
      hide_friction: Float,
    ) -> BottomSheet

hide_friction sets the value of hide_friction for this BottomSheet.

## hideable

</>

    pub fn hideable(
      record: BottomSheet,
      hideable: Hideable,
    ) -> BottomSheet

hideable sets the value of hideable for this BottomSheet.

## modal

</>

    pub fn modal(record: BottomSheet, modal: Modal) -> BottomSheet

modal sets the value of modal for this BottomSheet.

## new

</>

    pub fn new() -> BottomSheet

new creates a new BottomSheet with the default configuration.

## open

</>

    pub fn open(record: BottomSheet, open: Open) -> BottomSheet

open sets the value of open for this BottomSheet.

## overshoot_limit

</>

    pub fn overshoot_limit(
      record: BottomSheet,
      overshoot_limit: Float,
    ) -> BottomSheet

overshoot_limit sets the value of overshoot_limit for this BottomSheet.

## render

</>

    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

## render_config

</>

    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

## slot

</>

    pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

✨