Management Bar
betaA floating bulk-actions toolbar that springs up with a selection: a rolling count, icon actions whose labels spring open on hover or focus, and a rolling pager.
- Data
- 1 file
- 2 npm packages
- Accessibility notes
- Animates with motion
pnpm dlx @dowel-ui/cli add management-barnpm packages installed: class-variance-authority, motion.
import { ManagementBar } from "@/components/ui/management-bar";Default
Labels Always
Playground
Floating
<ManagementBar>
| Prop | Type | Default |
|---|---|---|
selectedCount (required)How many items are selected. The bar shows while it is above zero, unless | number | — |
actionsBulk actions, in order. | ManagementBarAction[] | [] |
clearLabelThe clear button's accessible name. | string | "Clear selection" |
defaultPageUncontrolled initial page. | number | 1 |
labels
| "hover" | "always" | "hover" |
nextLabel | string | "Next page" |
onClearSelectionCalled by the clear button. Without it, no clear button is shown. | () => void | — |
onPageChange | (page: number) => void | — |
openOverrides whether the bar is shown. Defaults to | boolean | — |
pageControlled current page, 1-based. | number | — |
pageCountTotal pages. Without it (or with fewer than 2), there is no pager. | number | — |
placement | "floating" | "inline" | "floating" |
previousLabelPager button names. | string | "Previous page" |
selectedLabelWord after the count, visibly and in the announcement: "3 selected". | string | "selected" |
surfaceClassNameClasses for the pill itself. | string | — |
Plus every attribute of <div> except children, role.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes