Versatile toolbar component with action buttons and dropdown menus for common operations.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- lucide-react
Code
import {
AlignLeft,
AlignCenter,
AlignRight,
Edit3,
MoreHorizontal,
} from "lucide-react";
import { ActionToolbar } from "@/registry/ruixenui/action-toolbar";
export default function ToolbarDemo() {
return (
<div className="flex items-center justify-center min-h-screen">
<ActionToolbar
buttons={[
{ label: "Left", icon: <AlignLeft className="size-4" /> },
{ label: "Center", icon: <AlignCenter className="size-4" /> },
{ label: "Right", icon: <AlignRight className="size-4" /> },
{
label: "Edit",
icon: <Edit3 className="size-4" />,
dropdownItems: ["Rename", "Duplicate", "Move to…"],
},
{
label: "More",
icon: <MoreHorizontal className="size-4" />,
dropdownItems: ["Settings", "Export", "Archive"],
},
]}
/>
</div>
);
}
































