Skip to content
English
Quick actions comes with Pro. Its preview shows once you unlock it.

How it works

The root covers its positioned container with position: absolute and inset: 0 and passes pointer events through, so it adds nothing to the layout. Opening fades in a scrim of the surface colour at 64% over a constant 10px backdrop blur (only opacity animates), turns the + by 135° into ×, and raises the actions: each starts 18px plus 10px per row lower at 55% size and transparent, and springs into place over 520ms, the nearest to the button first, 45ms apart. Hover or focus lifts a row onto a white pill with the card shadow. Closing reverses the order, farthest first, in 180ms ease-in.

Use it for

  • The few things people start most often from one screen: send, request, add, scan.
  • Mobile screens and compact panels where a toolbar would crowd the content.
  • Creation shortcuts in a dashboard card or a map view.

Look elsewhere when

  • More than five or six actions: use a menu or a page.
  • The one primary action of a page: show it as a button.
  • Actions that need explaining before they run: use a dialog.

Usage

import { QuickActions } from './QuickActions.jsx'

const actions = [
  { id: 'send', label: 'Send', icon: <SendIcon />, tone: 1 },
  { id: 'request', label: 'Request', icon: <RequestIcon />, tone: 3 },
  { id: 'topup', label: 'Top up', icon: <CardIcon />, tone: 6 },
]

export function WalletScreen({ navigate }) {
  return (
    // The container is the positioned, rounded box the scrim covers
    <section style={{ position: 'relative', overflow: 'hidden', borderRadius: 28 }}>
      <Balance />
      <RecentActivity />
      <QuickActions actions={actions} onSelect={(id) => navigate(`/wallet/${id}`)} />
    </section>
  )
}

Props

PropTypeDefaultWhat it does
actions{ id, label, icon, tone?, description? }[]—The actions, top to bottom. icon is a 20px element shown in a 40px square tinted with chart colour tone (1–8); description adds a second, quieter line.
onSelect(id) => void—Called with the chosen action's id; the menu then closes and focus returns to the button.
open / defaultOpen / onOpenChangeboolean / boolean / (open) => void- / false / -Controlled or uncontrolled open state, and a callback when it changes.
placement'bottom-end' | 'bottom-start''bottom-end'The corner of the container the button sits in; the actions stack above it and line up with it.
offsetnumber16Distance in px from the container's edges.
scrimbooleantrueFrost and dim the container behind while open; a press on it closes.
tone'ink' | 'accent''ink'Colour of the round button.
labelsobject—Replaces built-in text: open (button and menu name), close (button name while open). Shallow-merged over the English defaults.
...restHTMLAttributes—Other attributes go to the root <div>, which covers the container.

Accessibility

  • The button has aria-haspopup, aria-expanded and aria-controls, and its name switches between labels.open and labels.close.
  • The actions are a menu of menuitem buttons: opening focuses the first one, Up and Down arrows, Home and End move, Enter or Space chooses, Escape closes and returns focus to the button, Tab closes.
  • While closed the menu is hidden from screen readers and cannot be focused.
  • Icons are decorative; each action is named by its label text.
  • Rows are at least 48px tall (52px on touch screens) and the button is 52px.
  • Reduced motion fades the scrim and the actions in place without travel or stagger.

Motion

Open: scrim opacity 360ms ease-out; + turns 135° with a spring over 360ms; actions spring up over 520ms with a slight overshoot, nearest first, 45ms apart. Close: actions 180ms ease-in, farthest first, 22ms apart; scrim 240ms ease-in after 60ms.

Add it to your project

Pro members copy a prompt and their coding agent installs the source, the same way as the free components.

QuickActions.jsxquick-actions.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Overlays
Bottom sheet comes with Pro. Its preview shows once you unlock it.