<tap-action-sheet>

Action Sheet component. Slides up from the bottom of the screen, allowing users to choose between multiple actions.

Example

Imperative Calling

import { ActionSheet } from '@mantou/tap-ui/elements/action-sheet';

await ActionSheet.open({
  heading: 'Share',
  groups: [
    {
      actions: [
        { label: 'Copy Link', onClick: () => console.log('copy') },
        { label: 'Delete', danger: true, onClick: () => console.log('delete') },
      ],
    },
  ],
  cancel: true,
});

API

Shadow DOM; Extends GemElement

Static Methods

Method Type
open <T = unknown>(options: ActionSheetOptions<T>) => DyPromise<ActionSheetAction<T> | undefined, { actionSheet: TapActionSheetElement<T>; sheet: TapSheetElement; }> & ...

Instance Properties

Property(Attribute) Reactive Type
cancelText(cancel-text) Yes string
mode(mode) Yes ActionSheetMode
heading Yes string | TemplateResult
description Yes string | TemplateResult
actions Yes ActionSheetAction<T>[]
groups Yes ActionSheetGroup<T>[]
select Emitter<ActionSheetAction<T>>
cancel Emitter

Other

Type Value
Event select, cancel
Part header, heading, description, group, group-label, action, cancel