# 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

</>

Alert is whether the dialog is an alert.

    pub type Alert {
      IsAlert
      IsNotAlert
    }

### Constructors

-     IsAlert

-     IsNotAlert

## Config

</>

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

-     Config(
        alert: Alert,
        close_label: String,
        disable_close: DisableClose,
        dismissible: Dismissible,
        no_focus_trap: NoFocusTrap,
        open: String,
      )

## Dialog

opaque </>

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

</>

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

    pub type DisableClose {
      IsDisableClose
      IsNotDisableClose
    }

### Constructors

-     IsDisableClose

-     IsNotDisableClose

## Dismissible

</>

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

    pub type Dismissible {
      IsDismissible
      IsNotDismissible
    }

### Constructors

-     IsDismissible

-     IsNotDismissible

## NoFocusTrap

</>

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

    pub type NoFocusTrap {
      IsNoFocusTrap
      IsNotNoFocusTrap
    }

### Constructors

-     IsNoFocusTrap

-     IsNotNoFocusTrap

## Slot

</>

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

    pub type Slot {
      Header
      Actions
      CloseIcon
    }

### Constructors

-     Header

-     Actions

-     CloseIcon

# Values

## alert

</>

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

alert sets the value of alert for this Dialog.

## close_label

</>

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

close_label sets the value of close_label for this Dialog.

## default_alert

</>

    pub const default_alert: Alert

## default_close_label

</>

    pub const default_close_label: String

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disable_close

</>

    pub const default_disable_close: DisableClose

## default_dismissible

</>

    pub const default_dismissible: Dismissible

## default_no_focus_trap

</>

    pub const default_no_focus_trap: NoFocusTrap

## default_open

</>

    pub const default_open: String

## disable_close

</>

    pub fn disable_close(
      record: Dialog,
      disable_close: DisableClose,
    ) -> Dialog

disable_close sets the value of disable_close for this Dialog.

## dismissible

</>

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

dismissible sets the value of dismissible for this Dialog.

## from_config

</>

    pub fn from_config(config: Config) -> Dialog

from_config creates a new Dialog from the given configuration.

## new

</>

    pub fn new() -> Dialog

new creates a new Dialog with the default configuration.

## no_focus_trap

</>

    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.

## open

</>

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

open sets the value of open for this Dialog.

## render

</>

    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

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

## slot

</>

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

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

✨