ActionBar
A fixed-position bottom bar for bulk selection actions
Source
Package
Usage
ActionBar is a bottom bar with bulk actions that appears when items are selected.
Use ActionBar.Divider to separate groups of actions and ActionBar.CloseButton
to add a close button that calls onClose:
| Element position | Element name | Symbol | Atomic mass | |
|---|---|---|---|---|
| 6 | Carbon | C | 12.011 | |
| 7 | Nitrogen | N | 14.007 | |
| 39 | Yttrium | Y | 88.906 | |
| 56 | Barium | Ba | 137.33 | |
| 58 | Cerium | Ce | 140.12 |
With ActionIcon buttons
| Element position | Element name | Symbol | Atomic mass | |
|---|---|---|---|---|
| 6 | Carbon | C | 12.011 | |
| 7 | Nitrogen | N | 14.007 | |
| 39 | Yttrium | Y | 88.906 | |
| 56 | Barium | Ba | 137.33 | |
| 58 | Cerium | Ce | 140.12 |
Placement
By default, ActionBar is centered at the bottom of the screen. Change it with the position prop.
For non-centered positions, set styles={{ root: { marginInline: 0 } }} to remove the auto centering.
Use affixProps to pass props down to the underlying Affix:
Close on Escape
Set closeOnEscape to close the bar with the Escape key. Escape pressed inside
a modal or an opened dropdown does not close the bar:
Transitions
Use transitionProps to change the transition, its duration and timing function:
keepMounted
By default, the action bar is removed from the DOM when it is closed. Set keepMounted
to keep it mounted, for example to preserve form state inside the bar:
Rendering in a portal
ActionBar is rendered inside Portal by default. Set withinPortal={false}
to render it in place:
Accessibility
ActionBar does not set any labels by default, set:
aria-labelonActionBarto describe what the actions apply toaria-labelonActionBar.CloseButton, it renders only an icon
Screen readers are not notified when the bar appears. Set announcement to announce it
every time the bar opens or its content changes: