Bind open to the selection and clear it in onClear. Put the content right after the list.
file-list-actions.tsx
ActionBar
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | |
| open | boolean | — | The open state (controlled). Bind it to the selection: open={selected.size > 0}. |
| default | boolean | false | The open state on the first render (uncontrolled). |
| on | — | Called when the bar closes from inside (the close button or Escape), with the reason. | |
| on | — | Called first when the user clears from the bar. Clear the selection here. | |
| actions | RefObject<{ focus: () => void; } | null> | — | Gives focus, which moves focus into the bar. Use it for an app shortcut (F6). |
| final | — | 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>| Prop | Type | Default | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||
| container | HTMLElement | 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 | ||||||||||
| disabled | boolean | — | ||||||||
| loop | boolean | true | If 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>| Prop | Type | Default | Description |
|---|---|---|---|
| widest | ReactNode | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
From Base UIToolbar.GroupBase UI docs | |||
| disabled | boolean | false | When 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>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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" | ||||||||||||
| class | string | — | ||||||||||||
| unstyled | boolean | — | 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. | |||||||||||
| chevron | boolean | — | 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. | |||||||||||
| busy | boolean | false | Shows 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 | ||||||||||||||
| disabled | boolean | false | When true the item is disabled. | |||||||||||
| focusable | boolean | true | When 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>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| collapse | "end""start" | — | Where items fold: end (default) keeps the first ones, start keeps the last ones. |
| min | number | — | 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. |
| locale | string | — | Formats the count with Intl.NumberFormat ("ar-EG": "+٣"). Default: the DisplayLocaleProvider locale, else "en-US". |
| labels | Partial<{ more: string; }> | — | The words (OVERFLOW_LIST_LABELS). Keep the object stable. |
| items | readonly Item[] | — | The actions, in order. The ones that do not fit go into "More", from the end. |
| item | — | A stable key for each action (an id), unique in items (see OverflowList itemKey). | |
| render | — | One action in the bar: return one ActionBarButton (or a Tooltip or Menu around one). | |
| render | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| rounded | "default""full" | — | |
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |
| class | string | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
ActionBarInput
<input>| Prop | Type | Default | Description |
|---|---|---|---|
| rounded | "default""full" | — | |
| size | "default""lg""sm""xs" | — | |
| surface | "default""group" | — | |
| class | string | — | |
From Base UIToolbar.InputBase UI docs | |||
| disabled | boolean | false | When true the item is disabled. |
| focusable | boolean | true | When true the item remains focusable when disabled. |
| default | string | number | readonly string[] | — | |
| ...props | <input> attributes | — | Every other attribute goes to the <input>, with a ref. |
ActionBarSeparator
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
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>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 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" | — | ||||||||||||
| class | string | — | ||||||||||||
| unstyled | boolean | — | 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. | |||||||||||
| chevron | boolean | — | 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 | ||||||||||||||
| disabled | boolean | false | When true the item is disabled. | |||||||||||
| focusable | boolean | true | When 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. | |||||||||||
| TaborShiftTab | Moves 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. |
| HomeorEnd | Moves to the first or the last action. |
| Escape | Clears the selection and closes the bar. Focus goes back to where it was before the bar. |
Built with
Installs with Action Bar
- Components
- Button,Menu,Overflow List,Portal,Toolbar









