Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

ActionBar

Open .md
Live preview

Loading example…

Floating toolbar for bulk actions on a selection. Announces the count politely.

import { ActionBar } from "@jcsoftdev/ui/containers";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/action-bar.

export const Default: Story = { render: () => <Demo width="32rem" /> };

Source of the Storybook story.

Prop Type Default Description
ref Ref<HTMLDivElement> Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).
selectedCount * number Number of selected items. The bar renders nothing while it is 0.
noun [singular: string, plural: string] ["seleccionado", "seleccionados"] Singular and plural noun for the live count, e.g. [“cita”, “citas”].
onClear (() => void) Clears the selection (close button and Escape).
children ReactNode Bulk actions, usually Buttons.
position "absolute" | "fixed" | "static" "absolute" fixed floats over the viewport; absolute floats inside the nearest positioned ancestor (a card, a table wrapper); static renders inline.
material "solid" | "glass" | "glass-clear" | "liquid" | "liquid-clear" Surface material. Omitted keeps the default for this layer; "glass" and "glass-clear" are frosted glass, "liquid" and "liquid-clear" Liquid Glass (with its fallbacks), "solid" forces an opaque surface. Liquid options go in style (liquidStyle() f…
classNames Partial<Record<ActionBarPart, string>> Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last.

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/containers/action-bar/action-bar.tsx