defmodule PyrauiWeb.DocsLive.ModalDocs do use PyrauiWeb, :html def render(assigns) do assigns = assigns |> assign_new(:docs_modal_confirm_open, fn -> false end) |> assign_new(:docs_modal_glass_open, fn -> false end) |> assign_new(:docs_modal_large_open, fn -> false end) ~H"""
Accessible dialogs with variants, subtle motion, and thoughtful defaults.
Use for destructive or high-signal actions.
Deleting will remove all data. This action cannot be undone.
<:footer>A frosted panel for light, non-blocking content.
PyraUI 1.3 introduces tone-aware badges, tables, and chart upgrades.
<:footer>Prominent header line signals a risky operation.
We’ll generate new client secrets and disable the previous set after 24 hours.
<:footer>
Control size, variant, and accessibility labels. Bind
show
to LiveView state and use open-modal/close-modal events as shown.
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | — | Unique id for dialog and accessibility hooks. |
| show | boolean | false | Controls visibility; bind to LiveView assigns. |
| size | :sm | :md | :lg | :xl | :md | Max width of the dialog frame. |
| variant | :classic | :glass | :danger | :classic | Visual style for the frame and header. |
| title (slot) | slot | — | Dialog title area. |
| footer (slot) | slot | — | Actions area; place primary action last. |