Slide-over panel (drawer) that enters from a screen edge. Mirrors Fluxon's
sheet/1, and shares the dialog open/close runtime with modal/1, so it's
driven by LanternUI.open_dialog/1 / close_dialog/1.
<.sheet id="edit-theme" placement="right">
<h2>Edit theme</h2>
<p>…</p>
<.button phx-click={LanternUI.close_dialog("edit-theme")}>Done</.button>
</.sheet>
<.button phx-click={LanternUI.open_dialog("edit-theme")}>Edit…</.button>Focus trap, scroll lock, and Escape/backdrop dismissal come from the shared
overlay runtime (the LanternSheet hook). placement slides the panel from
left / right / top / bottom.
Summary
Functions
Attributes
id(:string) (required) - Stable DOM id used by open_dialog/close_dialog.open(:boolean) - render already open (server-driven sheets). Defaults tofalse.placement(:string) - Screen edge the panel slides in from. Defaults to"right". Must be one of"left","right","top", or"bottom".title(:string) - optional header title beside the close button. Defaults tonil.on_open(Phoenix.LiveView.JS) - JS command run when the sheet opens. Defaults tonil.on_close(Phoenix.LiveView.JS) - JS command run when the sheet closes. Defaults tonil.close_on_esc(:boolean) - Close when Escape is pressed. Defaults totrue.close_on_outside_click(:boolean) - Close when the backdrop is clicked. Defaults totrue.prevent_closing(:boolean) - Block Escape and outside-click close. Defaults tofalse.hide_close_button(:boolean) - Hide the built-in close control. Defaults tofalse.class(:any) - Extra classes on the sliding panel. Defaults tonil.container_class(:any) - Extra classes on the overlay root. Defaults tonil.backdrop_class(:any) - Extra classes on the dimmed backdrop. Defaults tonil.animation(:string) - Accepted for Fluxon compat; slide is token-driven. Defaults tonil.animation_enter(:string) - Accepted for Fluxon compat. Defaults tonil.animation_leave(:string) - Accepted for Fluxon compat. Defaults tonil.- Global attributes are accepted. Arbitrary HTML/
phx-*attributes passed through.
Slots
header- custom header content (replacestitle).footer- sticky footer (action buttons).inner_block(required) - Sheet body content.