Pages
Introduction Colors & Tokens Icons
UI
Button Link Badge Notification Badge Alert Card Spinner Avatar Divider Empty State
Interactive
Modal Side Modal Dropdown Tooltip Accordion Tabs Flash Toast
Forms
Form Select Toggle Checkbox & Radio Text Fields Date & Time Fields
Layout
Navbar Sidebar Table Pagination Breadcrumbs Selector List
Utilities
Local Time

Modal

A native dialog driven by the app-theme-modal custom element. Clicking the trigger slot opens it.

Default

Confirm changes

Saving will republish the page immediately. This can't be undone.

= app_theme_modal do |modal|
  - modal.with_trigger do
    = app_theme_button "Open modal", variant: :primary
  - modal.with_header do
    Confirm changes
  - modal.with_body do
    %p Saving will republish the page immediately. This can't be undone.
  - modal.with_footer do
    = app_theme_button "Save changes", variant: :primary

Sizes

A lg modal

Wider container for dense content.

A xl modal

Wider container for dense content.

.demo-row
  - %i[lg xl].each do |size|
    = app_theme_modal(size: size) do |modal|
      - modal.with_trigger do
        = app_theme_button "Open #{size} modal", variant: :secondary
      - modal.with_header do
        = "A #{size} modal"
      - modal.with_body do
        %p Wider container for dense content.