<%= render_component_header title: "Dialog", description: "A window overlaid on either the primary window or another dialog window, rendering the content underneath inert." %> <% content_for :preview, flush: true do %>
<%= render_dialog do %> <%= dialog_trigger do %> <%= render_button("Open Typography", variant: :outline) %> <% end %> <%= dialog_content do %>

The King's Plan

The king thought long and hard, and finally came up with a brilliant plan: he would tax the jokes in the kingdom.

"After all," he said, "everyone enjoys a good joke, so it's only fair that they should pay for the privilege."
<% end %> <% end %>
<% end %> <% content_for :code, flush: true do %> <%= code_partial("dialog/code/preview", :erb) %> <% end %> <%= render_preview %>

Installation

<%= code_sample(language: "sh") do %> rails generate shadcn-ui dialog <% end %>

Usage

<%= code_partial("dialog/code/usage", :erb) %> <%= render_usage("dialog") %>

Examples

<% content_for :examples, flush: true do %>
<%= render_dialog do %> <%= dialog_trigger do %> <%= render_button("Open Notifications", variant: :outline) %> <% end %> <%= dialog_content do %>

Notifications

Choose what you want to be notified about.

Everything

Email digest, mentions & all activity.

Available

Only mentions and comments.

Ignoring

Turn off all notifications.

<% end %> <% end %>
<% end %> <% content_for :code, flush: true do %> <%= code_partial("dialog/code/notifications", :erb) %> <% end %> <%= render_example %> <% content_for :examples, flush: true do %>
<%= render_dialog do %> <%= dialog_trigger do %> <%= render_button("Dialog with Form", variant: :outline) %> <% end %> <%= dialog_content do %>

Edit profile

Make changes to your profile here. Click save when you're done.

<% end %> <% end %>
<% end %> <% content_for :code, flush: true do %> <%= code_partial("dialog/code/form", :erb) %> <% end %> <%= render_example %>