Sheet

The main sheet component that manages state and positioning.

Read more Read less

Options

  • :id - Required unique identifier for the sheet.
  • :open - Whether the sheet is initially open. Defaults to false.
  • :on-open - Handler for open event. Accepts a server event name or %Phoenix.LiveView.JS{}.
  • :on-close - Handler for close event. Accepts a server event name or %Phoenix.LiveView.JS{}.
  • :"close-on-outside-click" - Whether overlay/outside click closes the sheet. Defaults to true.
  • :class - Additional CSS classes.

Component events

  • :on-open - Fired when the sheet opens.
  • :on-close - Fired when the sheet closes.

Server commands

Use SaladUI.LiveView.send_command(socket, id, command) with:

  • "open" - Opens the sheet.
  • "close" - Closes the sheet.
Attribute Type Documentation Default Value
Required id * :string

Unique identifier for the sheet

open :boolean

Whether the sheet is initially open

false
class :string
close-on-outside-click :boolean true
on-open :any

Handler for sheet open event

on-close :any

Handler for sheet close event

rest :global
Required inner_block * :slot