Dialog
Modal schmodal
Includes a Ruby component and corresponding Rails helper
RubyIncludes a Stimulus controller
StimulusExample
<%= nk_dialog do |d| %>
<%= d.trigger "New post" %>
<%= d.dialog do %>
<%= d.title "New post" %>
<%= d.description "Start off your new post ..." %>
<%= nk_form_for ... do %>
...
<% end %>
<%= d.close_button %>
<% end %>
<% end %>
Usage
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <div> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | Arguments for NitroKit::Button.new() |
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <dialog> element |
| ||
---|---|---|
Property | Default | Description |
**attrs | Arguments for NitroKit::Button.new() |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <h2> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <div> element |