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/action-sheet.md.

Action Sheet

Offer a short list of choices about an action: from the bottom of the screen, or growing out of the button that presents it, as on iOS 26.

Installation

npx @blotch/dolan add action-sheet
import {
  UiActionSheet,
  UiActionSheetAnchor,
  UiActionSheetTitle,
  UiActionSheetItem,
  UiActionSheetCancel,
} from '../components/ui/action-sheet';
Tip

This also adds Popover, which draws the sheet opened from its control, with the Glass and Menu it builds on.

Usage

import { Component, signal } from '@angular/core';
import {
  UiActionSheet,
  UiActionSheetTitle,
  UiActionSheetItem,
  UiActionSheetCancel,
} from '../components/ui/action-sheet';
import { UiButton } from '../components/ui/button';

@Component({
  selector: 'app-share-menu',
  imports: [
    UiActionSheet,
    UiActionSheetTitle,
    UiActionSheetItem,
    UiActionSheetCancel,
    UiButton,
  ],
  template: `
    <ui-button (pressed)="open.set(true)">Share</ui-button>

    <ui-action-sheet [(open)]="open">
      <ui-action-sheet-title>Share this document</ui-action-sheet-title>
      <ui-action-sheet-item (pressed)="copyLink()">
        Copy link
      </ui-action-sheet-item>
      <ui-action-sheet-item (pressed)="sendEmail()">
        Send by email
      </ui-action-sheet-item>
      <ui-action-sheet-item variant="destructive" (pressed)="remove()">
        Delete
      </ui-action-sheet-item>
      <ui-action-sheet-cancel />
    </ui-action-sheet>
  `,
})
export class ShareMenu {
  protected readonly open = signal(false);

  protected copyLink(): void {}
  protected sendEmail(): void {}
  protected remove(): void {}
}
  • [(open)] two-way binds a signal. Set it to true to slide the sheet up.
  • Tapping an item emits its pressed, then closes the sheet. You don't need to set open yourself.
  • Tapping Cancel or the backdrop, or Android's back button, closes the sheet without emitting anything.
  • The title and items stack in one rounded group. <ui-action-sheet-cancel> always renders as its own tile below the group, wherever you put it.
  • Items and the title render their content in a <text>, so put plain text in them.
  • The sheet draws in an <overlay>, so it covers the whole screen wherever it sits in your template.
  • When it opens, a screen reader moves into the sheet and stays inside it until the sheet closes.

From its control

Mark the button that presents the sheet with [uiActionSheetAnchor], and the sheet opens from it:

<ui-button
  variant="outline"
  [uiActionSheetAnchor]="draftSheet"
  (pressed)="open.set(true)"
>
  Discard Draft
</ui-button>

<ui-action-sheet #draftSheet [(open)]="open">
  <ui-action-sheet-title>Delete this draft?</ui-action-sheet-title>
  <ui-action-sheet-item variant="destructive" (pressed)="remove()">
    Delete Draft
  </ui-action-sheet-item>
  <ui-action-sheet-item (pressed)="save()">Save Draft</ui-action-sheet-item>
  <ui-action-sheet-cancel />
</ui-action-sheet>
  • #draftSheet names the sheet, and [uiActionSheetAnchor] points the button at it. The directive only says where the sheet opens from. Open it as before, from the button's own handler.
  • Nothing dims, and the rest of the screen stays usable. A touch outside the sheet closes it, and still reaches what it touched. Android's back button closes it too.
  • There's no Cancel button. A touch outside is the cancel, as iOS and Material menus have it. Keep <ui-action-sheet-cancel> for the platforms that still show one.
  • The button hides while the sheet covers it. One that's glass itself (<blur-view ui-glass [uiActionSheetAnchor]>) hands its glass over to the sheet on iOS 26, as a menu's trigger does.
PlatformWhat you get
iOS 26 and laterLiquid Glass that grows out of the button, over it, with the choices centered
iOS 15 to 25The sheet from the bottom of the screen, with Cancel: iPhone action sheets always rose there
AndroidA Material 3 menu that unfolds below the button, on a solid surface with a shadow
Android, with provideGlass({ android: 'glass' })Liquid Glass, as on iOS 26
Web previewLiquid Glass, as on iOS 26

On Android, a Material 3 bottom sheet is the counterpart of the sheet from the bottom. Material puts choices about a button in a menu by that button, so the anchored sheet is one. It shares its placement with Popover and Menu.

Destructive items

variant="destructive" colors an item's text red, for actions such as delete.

<ui-action-sheet-item variant="destructive" (pressed)="remove()">
  Delete
</ui-action-sheet-item>

Navigate from pressed, as from any tap handler:

readonly #router = inject(Router);

protected openSettings(): void {
  this.#router.navigateByUrl('/settings');
}

You can also wait for closed, which emits after the slide-down animation, from a timer.

Cancel label

<ui-action-sheet-cancel label="Not now" />

API

UiActionSheet

InputTypeDefaultDescription
openbooleanfalseWhether the sheet is shown. Supports [(open)].
classstring''Extra Tailwind classes for the column that holds the group and Cancel.
OutputTypeDescription
openChangebooleanEmits false when an item, Cancel or the backdrop closes the sheet. Part of [(open)].
closedvoidEmits after the close animation finishes.
MethodDescription
close()Closes the sheet.

UiActionSheetAnchor

Selector: [uiActionSheetAnchor]. Put it on the control that presents the sheet.

InputTypeDefaultDescription
uiActionSheetAnchorUiActionSheet(required)The sheet, by its template reference.

UiActionSheetItem

InputTypeDefaultDescription
variant'default' | 'destructive''default'Text color.
OutputTypeDescription
pressedvoidEmits when the item is tapped, before the sheet closes.

UiActionSheetCancel

InputTypeDefaultDescription
labelstring'Cancel'The button's text.

No outputs. Tapping it closes the sheet.

All sub-components (UiActionSheetTitle, UiActionSheetItem, UiActionSheetCancel) accept class. Items and Cancel only work inside a <ui-action-sheet>, because they close it.

Theme colors

Opened from its control, the sheet's text reads glass-foreground and glass-muted-foreground. See Glass.

Accessibility

  • Items and Cancel are buttons, and the title is a heading, to a screen reader.
  • From the bottom, a screen reader moves into the sheet and stays there until it closes.
  • From its control, a screen reader moves into the sheet, and the rest of the screen stays reachable, as it does for touch.
  • Reduce Motion: a sheet from its control appears in place, and its choices fade in.