Sheet
Extends the Dialog component to display content that complements the main content of the screen.
Usage
Example
Sheet do
SheetTrigger do
Button(variant: :outline) { "Open" }
end
SheetContent do
SheetHeader do
SheetTitle { "Edit profile" }
SheetDescription { "Make changes to your profile here. Click save when you're done." }
end
SheetMiddle(class: "grid gap-6") do
div(class: "grid gap-3") do
FormFieldLabel(for: "sheet-demo-name") { "Name" }
Input(id: "sheet-demo-name", value: "Joel Drapper")
end
div(class: "grid gap-3") do
FormFieldLabel(for: "sheet-demo-email") { "Email" }
Input(id: "sheet-demo-email", value: "[email protected]")
end
end
SheetFooter do
Button { "Save changes" }
Button(variant: :outline, data: { action: 'click->ruby-ui--sheet#dismiss' }) { "Close" }
end
end
end
Side
Use the side keyword to choose the edge of the screen the sheet slides in from: :top, :right (default), :bottom or :left.