Create a modal dialog using Designsystemet styles. Place ds_dialog() in
your UI and open/close it from the server with show_ds_dialog() and
hide_ds_dialog().
Arguments
- ...
Dialog content
- id
Dialog ID for opening/closing via
show_ds_dialog()- class
Additional CSS classes
Examples
ds_dialog(
id = "my-dialog",
ds_heading("Dialog Title", level = 2),
ds_paragraph("Dialog content here."),
ds_button("Close", onclick = "this.closest('dialog').close()")
)
#> <dialog id="my-dialog" class="ds-dialog">
#> <h2 class="ds-heading">Dialog Title</h2>
#> <p class="ds-paragraph">Dialog content here.</p>
#> <button class="ds-button" type="button" onclick="this.closest('dialog').close()">Close</button>
#> </dialog>