Sheet

Display content that complements the main content of the screen.

Anatomy

Sheet do |s|
s.trigger
s.content do
s.header do
s.title
s.description
end
s.footer do
s.close
end
end
end

API Reference

Sheet

NameTypeDefault
open:booleanfalse
Controls the initial open state of the sheet. When true, the sheet will be visible on render.
attributeskeyword arguments

Sheet#trigger

NameTypeDefault
as_child:booleanfalse
When true, merges the trigger functionality with the child element instead of creating a wrapper div.
attributeskeyword arguments

Sheet#content

NameTypeDefault
side:symbol:right
Options: :top | :left | :right | :bottom
attributeskeyword arguments

Sheet#header

NameType
attributeskeyword arguments

Sheet#title

NameType
attributeskeyword arguments

Sheet#description

NameType
attributeskeyword arguments
NameType
attributeskeyword arguments

Sheet#close

NameTypeDefault
as_child:booleanfalse
When true, merges the close functionality with the child element instead of creating a wrapper div.
attributeskeyword arguments

Keyboard Interactions

KeyDescription
SpaceOpens/closes the sheet.
EnterOpens/closes the sheet.
TabMoves focus to the next focusable element.
Shift+TabMoves focus to the previous focusable element.
EscCloses the sheet and moves focus to trigger.

Examples