Action Sheet

A mobile-style modal panel that slides in from the bottom and presents a list of actions. Each action is a full-width button; the sheet traps focus, closes on Escape or overlay tap, and supports destructive styling.

Usage

<script>
  import { ActionSheet, ActionSheetItem } from '@vultra/ui';

  let open = $state(false);
</script>

<button onclick={() => (open = true)}>Open Sheet</button>

<ActionSheet bind:open title="Choose an action">
  <ActionSheetItem label="Copy Link" onselect={() => console.log('copied')} />
  <ActionSheetItem label="Share" />
  <ActionSheetItem label="Delete" destructive onselect={() => console.log('deleted')} />
</ActionSheet>

Props

ActionSheet

PropTypeDefaultDescription
openbooleanBindable visibility state
titlestringOptional header title
cancelLabelstring'Cancel'Label for the cancel button
showCancelbooleantrueShow the cancel button
onclose() => voidCalled when the sheet closes
classstringAdditional CSS classes
childrenSnippetSheet content / items

ActionSheetItem

PropTypeDefaultDescription
labelstringItem text
destructivebooleanfalseStyles the item with the destructive color
iconSnippetOptional leading icon
onselect() => voidCalled when the item is selected
onclick(e: MouseEvent) => voidNative click handler
disabledbooleanfalseDisables the item
classstringAdditional CSS classes

Features

  • Modal panel sliding from the bottom (mobile-first pattern).
  • Focus trap keeps Tab navigation within the sheet while open.
  • Closes on Escape, cancel button, or selecting an item.
  • Destructive items styled with the destructive token.
  • Optional leading icon snippets per item.