Sheet
Slide a panel up from the bottom of the screen for secondary actions or a short form. Users close it by tapping the backdrop or dragging it down.
Installation
This also adds Bottom Sheet, which handles the sliding, dragging and backdrop, and Glass and Icon, which its glass variant draws with.
Usage
[(open)]two-way binds a signal. Set it totrueto slide the sheet up andfalseto slide it down.- A backdrop tap sets
openback tofalse. - The bar at the top is a drag handle. Dragging it down more than 100px closes the sheet, and a shorter drag springs it back. The backdrop lightens as it moves.
- The sheet pads its content and keeps it clear of the home indicator at the bottom of the screen.
- When it opens, a screen reader moves into the sheet and stays inside it until the sheet closes.
- Android's back button closes it.
<ui-sheet-title>and<ui-sheet-description>render<text>, so put plain text in them. The footer stacks its buttons full width.
Other content
Put any elements between the header and footer. Import LYNX_ELEMENTS in your component for them.
The sheet grows with its content. For long content, put a <scroll-view> with a fixed height inside, because a scroll view needs one to scroll.
Glass
variant="glass" draws each platform's own sheet: Liquid Glass on iOS 26 and later, the opaque sheet of iOS 15 to 25, and Material 3's bottom sheet on Android.
On iOS 26, at half height the glass sheet floats inset from the screen's edges, so the page shows around it. Dragged up to full height, it turns opaque and meets the edges. See Bottom Sheet for what each platform draws.
From the button that presents it
Mark the button that opens the sheet with uiSheetSource, and the glass sheet grows out of it instead of sliding up, and shrinks back into it as it closes, as iOS 26's sheets do:
- It only says where the sheet comes from. Open it as before, from the button's own tap.
- The button hides while the sheet covers it. A button that's glass itself, as here, hands its glass over to the sheet on iOS 26. Its icon fades out as the sheet grows, and back in as it closes into it.
- Only the Liquid Glass sheet grows out of it:
variant="glass"on iOS 26, in the web preview, and on Android withprovideGlass({ android: 'glass' }). The other designs, and every design under Reduce Motion, slide up as without one. A sheet dragged closed goes on down.
Import UiSheetSource from the bottom sheet (components/ui/bottom-sheet).
Detents
detents sets the heights the sheet rests at: 'fit' (its content's, the default), 'medium' (half the screen) and 'large' (the whole screen below the status bar). The handle drags it between them, and a tap on it moves to the next. [(detent)] binds the one it's at. See Bottom Sheet for the details.
With a medium or large detent, the sheet's content fills it as a column. Give a scroll view, or the view before the footer, flex-1 to take the height that's left.
Run code after it closes
closed emits once the slide-down animation has finished. It's a good place to navigate once the sheet has gone. You can also navigate straight from a button, as from any tap handler.
API
UiSheet
All sub-components (UiSheetHeader, UiSheetTitle, UiSheetDescription, UiSheetFooter) accept class.
UiSheetSource
Selector: [uiSheetSource]. Put it on the button that presents the sheet, with the sheet (a ui-sheet or ui-bottom-sheet) as its value. See From the button that presents it.
Related
- Dialogs and overlays: how overlays work and which one to use
- Bottom Sheet: the bare panel the sheet is built on
- Action Sheet: a list of actions from the bottom
- Dialog: a centered panel
- Glass: the Liquid Glass the glass variant draws with
