A floating toolbar for contextual actions - bulk selection, editing controls, or any set of actions that appear in response to user interaction.
A floating toolbar that animates in and out with isOpen, shown here with ListView bulk selection.
import {ActionBar} from "@heroui-pro/react";
import {Button, Chip, Separator} from "@heroui/react";
<ActionBar isOpen={hasSelection}>
<ActionBar.Prefix> {/* Optional */}
<Chip size="sm">{count}</Chip>
</ActionBar.Prefix>
<Separator /> {/* Optional */}
<ActionBar.Content> {/* Optional */}
<Button size="sm" variant="ghost">Edit</Button>
</ActionBar.Content>
<Separator /> {/* Optional */}
<ActionBar.Suffix> {/* Optional */}
<Button isIconOnly aria-label="Clear" size="sm" variant="ghost">
{/* ... */}
</Button>
</ActionBar.Suffix>
</ActionBar>;Combine with DataGrid for bulk selection workflows. The ActionBar appears when rows are selected and provides contextual actions like edit, export, archive, or delete.
Use the action-bar__label CSS class on any text you want hidden on mobile. Below the sm breakpoint (640px), elements with this class become sr-only: buttons collapse to icon-only while remaining accessible.
<Button aria-label="Edit" size="sm" variant="ghost">
<Pencil />
<span className="action-bar__label">Edit</span>
</Button>HeroUI follows the BEM methodology to ensure component variants and states are reusable and easy to customize.
The Action Bar component uses these CSS classes:
.action-bar: Outer positioning wrapper. Fixed to viewport bottom-center with pointer-events: none..action-bar__wrapper: The visible pill surface. Restores pointer-events: auto, applies shadow..action-bar__prefix: Leading section (badges, counts)..action-bar__content: Middle section for main actions..action-bar__suffix: Trailing section (dismiss button)..action-bar__label: Text that collapses to sr-only below 640px.The root component. Extends ToolbarProps from @heroui/react. It uses a Prefix / Content / Suffix structure; all three sections are optional. Use Separator from @heroui/react between sections as needed.
| Prop | Type | Default | Description |
|---|---|---|---|
isOpen | boolean | - | Controls visibility with animated enter/exit. Required. |
aria-label | string | "Actions" | Accessible label for the toolbar. |
isAttached | boolean | true | Whether the toolbar has a surface background with full rounding. |
orientation | "horizontal" | "vertical" | "horizontal" | The orientation of the toolbar. |
className | string | - | Additional CSS classes applied to the toolbar wrapper. |
children | ReactNode | - | Content: typically Prefix, Content, Suffix, and Separator components. |
Leading section container.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Content for the leading section (badges, counts, labels). |
className | string | - | Additional CSS classes. |
Middle section container for main actions.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Action buttons, dropdowns, etc. |
className | string | - | Additional CSS classes. |
Trailing section container.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Dismiss button, secondary actions. |
className | string | - | Additional CSS classes. |
Resources