m3e/dialog

Dialog is a dialog that provides important prompts in a user flow.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

     DO NOT EDIT

Types

Alert is whether the dialog is an alert.

pub type Alert {
  IsAlert
  IsNotAlert
}

Constructors

  • IsAlert
  • IsNotAlert

Config is a public record for configuring this component.

pub type Config {
  Config(
    alert: Alert,
    close_label: String,
    disable_close: DisableClose,
    dismissible: Dismissible,
    no_focus_trap: NoFocusTrap,
    open: String,
  )
}

Constructors

Dialog is a View Model for this component

Fields:

  • alert: Whether the dialog is an alert.
  • close_label: The accessible label given to the button used to dismiss the dialog.
  • disable_close: Whether users cannot click the backdrop or press ESC to dismiss the dialog.
  • dismissible: Whether a button is presented that can be used to close the dialog.
  • no_focus_trap: Whether to disable focus trapping, which keeps keyboard Tab navigation within the dialog.
  • open: Whether the dialog is open.
pub opaque type Dialog

DisableClose is whether users cannot click the backdrop or press ESC to dismiss the dialog.

pub type DisableClose {
  IsDisableClose
  IsNotDisableClose
}

Constructors

  • IsDisableClose
  • IsNotDisableClose

Dismissible is whether a button is presented that can be used to close the dialog.

pub type Dismissible {
  IsDismissible
  IsNotDismissible
}

Constructors

  • IsDismissible
  • IsNotDismissible

NoFocusTrap is whether to disable focus trapping, which keeps keyboard Tab navigation within the dialog.

pub type NoFocusTrap {
  IsNoFocusTrap
  IsNotNoFocusTrap
}

Constructors

  • IsNoFocusTrap
  • IsNotNoFocusTrap

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

pub type Slot {
  Header
  Actions
  CloseIcon
}

Constructors

  • Header
  • Actions
  • CloseIcon

Values

pub fn alert(record: Dialog, alert: Alert) -> Dialog

alert sets the value of alert for this Dialog.

pub fn close_label(record: Dialog, close_label: String) -> Dialog

close_label sets the value of close_label for this Dialog.

pub const default_alert: Alert
pub const default_close_label: String
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disable_close: DisableClose
pub const default_dismissible: Dismissible
pub const default_no_focus_trap: NoFocusTrap
pub const default_open: String
pub fn disable_close(
  record: Dialog,
  disable_close: DisableClose,
) -> Dialog

disable_close sets the value of disable_close for this Dialog.

pub fn dismissible(
  record: Dialog,
  dismissible: Dismissible,
) -> Dialog

dismissible sets the value of dismissible for this Dialog.

pub fn from_config(config: Config) -> Dialog

from_config creates a new Dialog from the given configuration.

pub fn new() -> Dialog

new creates a new Dialog with the default configuration.

pub fn no_focus_trap(
  record: Dialog,
  no_focus_trap: NoFocusTrap,
) -> Dialog

no_focus_trap sets the value of no_focus_trap for this Dialog.

pub fn open(record: Dialog, open: String) -> Dialog

open sets the value of open for this Dialog.

pub fn render(
  model: Dialog,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a Dialog

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 Dialog Config

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

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

Search Document