Action Sheet
A bottom-aligned modal list of actions — ideal for mobile context menus, sharing flows, and confirmations.
Basic Usage
Tap to open
Each action runs its onSelect handler and the sheet auto-closes.
import { ActionSheet, Button } from 'fluxo-ui';
const [open, setOpen] = useState(false);
<Button label="Share…" onClick={() => setOpen(true)} />
<ActionSheet
open={open}
onClose={() => setOpen(false)}
title="Share photo"
actions={[
{ label: 'Copy link', onSelect: copyLink },
{ label: 'Save to Files', onSelect: save },
{ label: 'Delete', destructive: true, onSelect: remove },
]}
/>Variants
iOS variant
Centered actions card with a separate cancel pill — the default.
<ActionSheet
open={open}
onClose={close}
variant="ios"
actions={[
{ label: 'Reply', onSelect: reply },
{ label: 'Forward', onSelect: forward },
]}
/>Material variant
Edge-to-edge bottom sheet with left-aligned rows.
<ActionSheet
open={open}
onClose={close}
variant="material"
title="Add new"
actions={[
{ label: 'New folder', onSelect: ... },
{ label: 'New document', onSelect: ... },
]}
/>Plain variant
Merges the cancel button into the same card.
<ActionSheet
open={open}
onClose={close}
variant="plain"
actions={[
{ label: 'Mark as read', onSelect: ... },
{ label: 'Archive', onSelect: ... },
]}
/>States
Destructive & disabled
Mark a single action as destructive for the danger color, disabled for non-interactive rows, and add a description for context.
<ActionSheet
open={open}
onClose={close}
title="Account"
actions={[
{ label: 'Switch account' },
{ label: 'Sign out', destructive: true, onSelect: signOut },
{ label: 'Delete account', destructive: true, disabled: true, description: 'Pending verification' },
]}
/>With Icons
Actions with icons
Pair each label with an icon — works for all variants.
<ActionSheet
open={open}
onClose={close}
actions={[
{ label: 'Share', icon: <ShareIcon /> },
{ label: 'Copy link', icon: <CopyIcon /> },
{ label: 'Download', icon: <DownloadIcon /> },
{ label: 'Delete', icon: <TrashIcon />, destructive: true },
]}
/>Import
import { ActionSheet } from 'fluxo-ui';
import type { ActionSheetProps, ActionSheetAction, ActionSheetStyle } from 'fluxo-ui';Props
openreqbooleanWhether the action sheet is visible.
openreqbooleanWhether the action sheet is visible.
onClosereq() => voidCalled when the sheet should close (backdrop tap, Escape, cancel, or after a selection).
onClosereq() => voidCalled when the sheet should close (backdrop tap, Escape, cancel, or after a selection).
titleReactNodeOptional short title rendered at the top of the actions group.
titleReactNodeOptional short title rendered at the top of the actions group.
messageReactNodeOptional supporting message rendered under the title.
messageReactNodeOptional supporting message rendered under the title.
actionsreqActionSheetAction[]Action items. Each item: { key?, label, description?, icon?, disabled?, destructive?, onSelect? }.
actionsreqActionSheetAction[]Action items. Each item: { key?, label, description?, icon?, disabled?, destructive?, onSelect? }.
cancelLabelstring"'Cancel'"Label for the cancel button.
cancelLabelstring"'Cancel'"Label for the cancel button.
showCancelboolean"true"Show the standalone cancel button below the actions group.
showCancelboolean"true"Show the standalone cancel button below the actions group.
onCancel() => voidCalled when the cancel button is tapped, before onClose.
onCancel() => voidCalled when the cancel button is tapped, before onClose.
variant'ios' | 'material' | 'plain'"'ios'"Visual variant. 'ios' centers items in a rounded card with a separate cancel pill; 'material' is a flush bottom sheet with left-aligned items; 'plain' merges actions and cancel into one card.
variant'ios' | 'material' | 'plain'"'ios'"Visual variant. 'ios' centers items in a rounded card with a separate cancel pill; 'material' is a flush bottom sheet with left-aligned items; 'plain' merges actions and cancel into one card.
closeOnSelectboolean"true"Auto-close after an action is selected.
closeOnSelectboolean"true"Auto-close after an action is selected.
closeOnBackdropClickboolean"true"Close on backdrop tap.
closeOnBackdropClickboolean"true"Close on backdrop tap.
closeOnEscapeboolean"true"Close when Escape is pressed.
closeOnEscapeboolean"true"Close when Escape is pressed.
safeAreaboolean"true"Apply env(safe-area-inset-bottom) so the sheet clears the iOS home indicator.
safeAreaboolean"true"Apply env(safe-area-inset-bottom) so the sheet clears the iOS home indicator.
classNamestringAdditional CSS class for the sheet root.
classNamestringAdditional CSS class for the sheet root.
ariaLabelstringAccessible name for the dialog. Defaults to the title text if it's a string.
ariaLabelstringAccessible name for the dialog. Defaults to the title text if it's a string.
Features
iOS, Material, Plain
Three visual variants covering both iOS and Android conventions plus a merged-list option.
Destructive & disabled rows
Each action can be marked destructive, disabled, or paired with a description line.
Safe-area-aware
Bottom padding respects env(safe-area-inset-bottom) so the sheet clears the iOS home indicator.
Keyboard & focus
Escape closes, focus is trapped while open, and focus is restored to the trigger on close.
Backdrop & escape control
closeOnBackdropClick and closeOnEscape props let you tune dismissal behavior.
Theme-driven colors
Surfaces and text use --eui-* variables — works across every brand theme and dark mode automatically.