ui/dialog

Types

pub type Size {
  Small
  Medium
  Large
}

Constructors

  • Small
  • Medium
  • Large
pub type Variant {
  Default
  Muted
}

Constructors

  • Default
  • Muted

Values

pub fn close(
  attributes: List(attribute.Attribute(a)),
) -> element.Element(a)
pub fn content(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
) -> element.Element(a)

Dialog content with optional ID for focus scope management.

Provide an id attribute to enable focus trapping with ui/focus.

Example

dialog.content([
  attribute("id", "my-dialog"),
  attribute("data-state", "open"),
], [
  dialog.title([], [text("Title")]),
  // ... dialog content
])
pub fn description(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
) -> element.Element(a)
pub fn dialog(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
) -> element.Element(a)
pub fn size(s: Size) -> attribute.Attribute(a)
pub fn title(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
) -> element.Element(a)
pub fn trigger(
  attributes: List(attribute.Attribute(a)),
  children: List(element.Element(a)),
) -> element.Element(a)
Search Document