Skip to content

Action Bar

Free

A bar that floats at the bottom of the screen while you select rows. It shows the count, the bulk actions, and a clear button. Escape clears the selection.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Bind open to the selection and clear it in onClear. Put the content right after the list.

file-list-actions.tsx

ActionBar

PropTypeDefaultDescription
childrenReactNode—
openboolean—The open state (controlled). Bind it to the selection: open={selected.size > 0}.
defaultOpenbooleanfalseThe open state on the first render (uncontrolled).
onOpenChange—Called when the bar closes from inside (the close button or Escape), with the reason.
onClear—Called first when the user clears from the bar. Clear the selection here.
actionsRefRefObject<{ focus: () => void; } | null>—Gives focus, which moves focus into the bar. Use it for an app shortcut (F6).
finalFocus—Where focus goes when the bar closes while focus is in it, if the element that had focus before the bar is gone (the rows that a Delete removed). By default: the element before the bar in Tab order.
labels—The words of the parts (ACTION_BAR_LABELS). Keep the object stable.

ActionBarContent

<div>
PropTypeDefaultDescription
classNamestring—
containerHTMLElement | null—Where the bar renders. By default, the end of <body>. In a modal Dialog or Drawer, pass its popup element: outside it, the bar is behind the focus trap and hidden from screen readers.
From Base UIToolbar.RootBase UI docs
disabledboolean—
loopFocusbooleantrueIf true, using keyboard navigation will wrap focus to the other end of the toolbar once the end is reached.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ActionBarSelection

<span>
PropTypeDefaultDescription
widestTextReactNode—The widest text this part shows, such as the text of the total ("248 selected"). The part keeps room for it, so the buttons do not move when "9 selected" turns into "10 selected". Without it, the width follows the text.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ActionBarGroup

<div>
PropTypeDefaultDescription
classNamestring—
From Base UIToolbar.GroupBase UI docs
disabledbooleanfalseWhen true all toolbar items in the group are disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ActionBarButton

<button>
PropTypeDefaultDescription
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs""sm"
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary""ghost"
classNamestring—
unstyledboolean—Drop the Button look and keep only className. Use it when render mounts a component with its own look (a Toggle, a ToggleGroupItem, a SelectTrigger), or the two looks mix.
chevronboolean—Add a chevron after the content, for a button that opens a menu, a select, or a popover with its current value in front ("Heading 1", a list icon, the color "A"). See the JSDoc of ToolbarButton. Default false.
busybooleanfalseShows a spinner in the leading slot, sets aria-busy, and blocks clicks; focus stays (our Button busy). Not with render: a Menu trigger has no busy state.
From Base UIToolbar.ButtonBase UI docs
disabledbooleanfalseWhen true the item is disabled.
focusableWhenDisabledbooleantrueWhen true the item remains focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

ActionBarOverflow

<div>
PropTypeDefaultDescription
classNamestring—
collapseFrom"end""start"—Where items fold: end (default) keeps the first ones, start keeps the last ones.
minVisiblenumber—Items that always show, even when they do not fit. A kept item that does not fit gets data-forced (an OverflowListItem then may shrink and cut its text). Use 1 for labels and paths, so the row never shows "+6" alone. Default 0.
localestring—Formats the count with Intl.NumberFormat ("ar-EG": "+٣"). Default: the DisplayLocaleProvider locale, else "en-US".
labelsPartial<{ more: string; }>—The words (OVERFLOW_LIST_LABELS). Keep the object stable.
itemsRequiredreadonly Item[]—The actions, in order. The ones that do not fit go into "More", from the end.
itemKeyRequired—A stable key for each action (an id), unique in items (see OverflowList itemKey).
renderItemRequired—One action in the bar: return one ActionBarButton (or a Tooltip or Menu around one).
renderMenuItemRequired—The same action as a row of the "More" menu: return one MenuItem.
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ActionBarLink

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ActionBarInput

<input>
PropTypeDefaultDescription
rounded"default""full"—
size"default""lg""sm""xs"—
surface"default""group"—
classNamestring—
From Base UIToolbar.InputBase UI docs
disabledbooleanfalseWhen true the item is disabled.
focusableWhenDisabledbooleantrueWhen true the item remains focusable when disabled.
defaultValuestring | number | readonly string[]—
...props<input> attributes—Every other attribute goes to the <input>, with a ref.

ActionBarSeparator

<div>
PropTypeDefaultDescription
classNamestring—
From Base UIToolbar.SeparatorBase UI docs
orientation"horizontal""vertical"—The orientation of the separator. Defaults to the opposite of the toolbar's orientation, so a horizontal toolbar renders vertical separators.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ActionBarClose

<button>
PropTypeDefaultDescription
rounded"default""full"—
size"default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs""icon-sm"
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
classNamestring—
unstyledboolean—Drop the Button look and keep only className. Use it when render mounts a component with its own look (a Toggle, a ToggleGroupItem, a SelectTrigger), or the two looks mix.
chevronboolean—Add a chevron after the content, for a button that opens a menu, a select, or a popover with its current value in front ("Heading 1", a list icon, the color "A"). See the JSDoc of ToolbarButton. Default false.
From Base UIToolbar.ButtonBase UI docs
disabledbooleanfalseWhen true the item is disabled.
focusableWhenDisabledbooleantrueWhen true the item remains focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.
  • Bind open to the selection (open={selected.size > 0}) and clear the selection in onClear.
  • Put ActionBarContent right after the list it acts on, so the bar sits there in Tab order.
  • Put the actions in ActionBarOverflow, so they fold into a More menu on a narrow screen.
  • Add actionBarReserveVariants() to the end of a page that ends with the list, so the last row can scroll clear of the bar.
  • For actions that show at all times, with no selection, use a Toolbar.
  • For a message that confirms an action after it ran, use a Toast.
TaborShiftTabMoves into the bar from the list before it or the control after it. The bar is one Tab stop.
← →Moves between the actions of the bar.
HomeorEndMoves to the first or the last action.
EscapeClears the selection and closes the bar. Focus goes back to where it was before the bar.

The bar is a toolbar in a landmark named "Bulk actions". The count names the toolbar, so focus that comes in reads "3 selected, toolbar".

The bar sits in Tab order where ActionBarContent is in the code: two focus guards hold its place, and they take no space.

When the bar closes with focus in it, focus goes back to the element that had it before, or to finalFocus.

Open
overlay · 200ms · ease-panel · rises 12px and fades in
Close
overlay-exit · 150ms · fades out

Built with

Installs with Action Bar

  1. AddedAction Bar, with Button, Menu, Overflow List, Portal, Toolbar.
Open the release