Toolbar
kokonut-ui/toolbarFreeComponent
Multiples actions toolbar inspired by Figma.
Live preview
live · rendered by the registry
Rendered by kokonut-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://kokonutui.com/r/toolbar.jsonSource
1"use client";23/**4 * @author: @dorianbaffier5 * @description: Toolbar6 * @version: 1.0.07 * @date: 2025-06-268 * @license: MIT9 * @website: https://kokonutui.com10 * @github: https://github.com/kokonut-labs/kokonutui11 */1213import {14 Bell,15 CircleUserRound,16 Edit2,17 FileDown,18 Frame,19 Layers,20 Lock,21 type LucideIcon,22 MousePointer2,23 Move,24 Palette,25 Shapes,26 Share2,27 SlidersHorizontal,28} from "lucide-react";29import { AnimatePresence, motion } from "motion/react";30import * as React from "react";31import { cn } from "@/lib/utils";3233interface ToolbarItem {34 id: string;35 title: string;36 icon: LucideIcon;37 type?: never;38}3940interface ToolbarProps {41 items?: ToolbarItem[];42 defaultSelected?: string;43 className?: string;44 activeColor?: string;45 onSelect?: (itemId: string) => void;46}4748const DEFAULT_TOOLBAR_ITEMS: ToolbarItem[] = [49 { id: "select", title: "Select", icon: MousePointer2 },50 { id: "move", title: "Move", icon: Move },51 { id: "shapes", title: "Shapes", icon: Shapes },52 { id: "layers", title: "Layers", icon: Layers },53 { id: "frame", title: "Frame", icon: Frame },54 { id: "properties", title: "Properties", icon: SlidersHorizontal },55 { id: "export", title: "Export", icon: FileDown },56 { id: "share", title: "Share", icon: Share2 },57 { id: "notifications", title: "Notifications", icon: Bell },58 { id: "profile", title: "Profile", icon: CircleUserRound },59 { id: "appearance", title: "Appearance", icon: Palette },60];6162const buttonVariants = {63 initial: {64 gap: 0,65 paddingLeft: ".5rem",66 paddingRight: ".5rem",67 },68 animate: (isSelected: boolean) => ({69 gap: isSelected ? ".5rem" : 0,70 paddingLeft: isSelected ? "1rem" : ".5rem",71 paddingRight: isSelected ? "1rem" : ".5rem",72 }),73};7475const spanVariants = {76 initial: { width: 0, opacity: 0 },77 animate: { width: "auto", opacity: 1 },78 exit: { width: 0, opacity: 0 },79};8081const notificationVariants = {82 initial: { opacity: 0, y: 10 },83 animate: { opacity: 1, y: -10 },84 exit: { opacity: 0, y: -20 },85};8687const lineVariants = {88 initial: { scaleX: 0, x: "-50%" },89 animate: {90 scaleX: 1,91 x: "0%",92 transition: { duration: 0.2, ease: "easeOut" },93 },94 exit: {95 scaleX: 0,96 x: "50%",97 transition: { duration: 0.2, ease: "easeIn" },98 },99};100101const transition = { type: "spring", bounce: 0, duration: 0.4 };102103export function Toolbar({104 items = DEFAULT_TOOLBAR_ITEMS,105 defaultSelected = "select",106 className,107 activeColor = "text-primary",108// … truncated
What it pulls in
npm packages
Files it writes
More from kokonut-ui
All 40 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Action Search Baraction-search-bar | kokonut-ui | Components | Free | 2 deps · 2 files | |
| AI Input Searchai-input-search | kokonut-ui | Components | Free | 1 dep · 2 files | |
| AI State Loadingai-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Input Selectorai-prompt | kokonut-ui | Components | Free | 2 deps · 4 files | |
| AI Text Loadingai-text-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Voiceai-voice | kokonut-ui | Components | Free | 2 deps | |
| Apple Activity Cardapple-activity-card | kokonut-ui | Components | Free | 1 dep | |
| Magnet Buttonattract-button | kokonut-ui | Components | Free | 2 deps |
