For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /dolan/sheet.md.

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

npx @blotch/dolan add sheet
import {
  UiSheet,
  UiSheetHeader,
  UiSheetTitle,
  UiSheetDescription,
  UiSheetFooter,
} from '../components/ui/sheet';

This also adds Bottom Sheet, which handles the sliding, dragging and backdrop, and Glass and Icon, which its glass variant draws with.

Usage

import { Component, signal } from '@angular/core';
import {
  UiSheet,
  UiSheetHeader,
  UiSheetTitle,
  UiSheetDescription,
  UiSheetFooter,
} from '../components/ui/sheet';
import { UiButton } from '../components/ui/button';

@Component({
  selector: 'app-settings-sheet',
  imports: [
    UiSheet,
    UiSheetHeader,
    UiSheetTitle,
    UiSheetDescription,
    UiSheetFooter,
    UiButton,
  ],
  template: `
    <ui-button (pressed)="open.set(true)">Settings</ui-button>

    <ui-sheet [(open)]="open">
      <ui-sheet-header>
        <ui-sheet-title>Settings</ui-sheet-title>
        <ui-sheet-description>Configure your preferences.</ui-sheet-description>
      </ui-sheet-header>
      <ui-sheet-footer>
        <ui-button (pressed)="open.set(false)">Save changes</ui-button>
        <ui-button variant="outline" (pressed)="open.set(false)">
          Cancel
        </ui-button>
      </ui-sheet-footer>
    </ui-sheet>
  `,
})
export class SettingsSheet {
  protected readonly open = signal(false);
}
  • [(open)] two-way binds a signal. Set it to true to slide the sheet up and false to slide it down.
  • A backdrop tap sets open back to false.
  • 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.

<ui-sheet [(open)]="open">
  <ui-sheet-header>
    <ui-sheet-title>Filters</ui-sheet-title>
  </ui-sheet-header>
  <view class="flex flex-col gap-3 py-4">
    <text class="text-sm text-foreground">Notifications: on</text>
  </view>
</ui-sheet>

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.

<ui-sheet variant="glass" [detents]="['medium', 'large']" [(open)]="open">
  <ui-sheet-header>
    <ui-sheet-title>Trip to Kyoto</ui-sheet-title>
  </ui-sheet-header>
  <view class="flex flex-1 flex-col gap-3">…</view>
  <ui-sheet-footer>
    <ui-button (pressed)="open.set(false)">Done</ui-button>
  </ui-sheet-footer>
</ui-sheet>

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:

<blur-view
  ui-glass
  interactive
  shape="circle"
  class="h-12 w-12 items-center flex justify-center"
  [uiSheetSource]="newTrip"
  (bindtap)="open.set(true)"
>
  <ui-icon name="plus" />
</blur-view>

<ui-sheet #newTrip variant="glass" [(open)]="open">…</ui-sheet>
  • 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 with provideGlass({ 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.

<ui-sheet [(open)]="open" (closed)="onClosed()">…</ui-sheet>

API

UiSheet

InputTypeDefaultDescription
openbooleanfalseWhether the sheet is shown. Supports [(open)].
variant'default' | 'glass''default''glass' draws each platform's own sheet. See Glass.
detentsSheetDetent[]['fit']The heights it rests at: 'fit', 'medium', 'large'. See Detents.
detentSheetDetent | undefinedundefinedThe detent it rests at while open. Supports [(detent)].
classstring''Extra Tailwind classes for the content area inside the panel. Default padding is px-6 pb-6.
OutputTypeDescription
openChangebooleanEmits false when a backdrop tap, a drag or Android's back button closes the sheet. Part of [(open)].
detentChangeSheetDetent | undefinedEmits when the sheet comes to rest at a detent, and undefined once it has closed. Part of [(detent)].
closedvoidEmits after the close animation finishes.

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.