Thrive Design System

Components

Action Bar

A floating toolbar that appears when items are selected, providing bulk action controls for lists and tables.

Installation

npm install @thrivecart/ui
yarn add @thrivecart/ui
pnpm add @thrivecart/ui
bun add @thrivecart/ui

Usage

import { ActionBarRoot, ActionBarContent, ActionBarCloseTrigger, ActionBarSelectionTrigger, ActionBarSeparator } from '@thrivecart/ui';

Examples

Basic Action Bar

Bulk Actions

Floating action bar for selected items

<ActionBarRoot open>
<ActionBarContent>
  <ActionBarSelectionTrigger>3 selected</ActionBarSelectionTrigger>
  <ActionBarSeparator />
  <Button variant="ghost" size="sm" leftIcon={<MdEdit />}>Edit</Button>
  <Button variant="ghost" size="sm" leftIcon={<MdArchive />}>Archive</Button>
  <Button variant="ghost-destructive" size="sm" leftIcon={<MdDelete />}>Delete</Button>
  <ActionBarCloseTrigger />
</ActionBarContent>
</ActionBarRoot>

Best Practices

Show selection count

Always display the number of selected items for context.

Provide a dismiss button

Include a close trigger so users can deselect and dismiss the bar.

Don't overcrowd

Limit to 3-5 actions. Move less common actions to an overflow menu.

Don't hide destructive actions

Show delete/destructive actions but visually distinguish them with the destructive variant.

Props

Props

Accessibility

  • Escape key dismisses the action bar and deselects items.
  • Actions are keyboard navigable.
  • Selection count is announced to screen readers.
  • Focus is managed when the bar appears and disappears.