Open the sheet; focus returns to opener (default: the focused element) on close.
showModal(opener)
Same as show() (the sheet is modal by default), so <focsd-button commandfor="…" command="show-modal"> opens it.
close(returnValue)
Close the sheet.
Events
Event
Description
close
Fired when the sheet closes.
Slots
Slot
Description
(default)
The sheet content.
CSS parts
Style the inside of the component with ::part(), for example focsd-bottom-sheet::part(dialog).
Part
Description
dialog
The dialog (modal) or region (non-modal).
panel
The sheet itself.
header
The header with the handle, title and close button.
handle
The resize handle.
grip
The handle's visible bar.
headline
The title.
close
The close button.
body
The scrolling content area.
Accessibility
Modal by default: a native dialog named by label, with a focus trap, an inert page, Escape, and focus back on the opener.
With non-modal it is a named region and the page stays usable.
The handle is a slider ("Resize sheet", "40% of the screen"); arrow keys, Home, End, Enter and Space change the height, and a Close button closes it, so dragging is never required (WCAG 2.5.7).
A drag that starts in scrolled content scrolls it; only a pull from the top moves the sheet. A downward flick dismisses.
Respects the iPhone home indicator area (env(safe-area-inset-bottom)) and reduced motion.
Keyboard
Key
Action
Up / Down (handle)
Next or previous height
Left / Right (handle)
Same as Down / Up
Home / End (handle)
Lowest / highest height
Enter / Space (handle)
Cycle heights
Escape
Close (modal)
Ask the docs
Hi, what are you building?
Ask about any component, theming, forms or frameworks. I answer with the right component, a snippet and a link to its docs.