Component docs
Loading
"use client";
import { ActionBar } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
actions | readonly PixxlAction[] | — | Action slot (buttons or links). |
onAction | (id: string) => void | — | Called with the id of the activated command (any leaf item). |
onValueChange | (value: string) => void | — | Called with the new value (only when it changes). |
actionsreadonly PixxlAction[]
Action slot (buttons or links).
onAction(id: string) => void
Called with the id of the activated command (any leaf item).
onValueChange(value: string) => void
Called with the new value (only when it changes).
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
const actions = [
{ id: "copy", label: "Copy" },
{ id: "rename", label: "Rename" },
];
<ActionBar aria-label="Bulk actions" actions={actions} />