This component no longer exists. It was in Quantumblack Design System Registry’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-08 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Toolbar
quantumblack-design-system-registry/toolbarRemovedComponent
Groups icon-only controls with keyboard navigation. Defaults to an unboxed horizontal layout; also supports optional boxed containers, vertical orientation, circle and square shapes, and sm, reg, and lg sizes.
Install it
npx shadcn@latest add http://designsystem.quantumblack.com/r/toolbar.jsonSource
1'use client';23import * as ToolbarPrimitive from '@radix-ui/react-toolbar';4import { cva } from 'class-variance-authority';5import * as React from 'react';67import { buttonVariants } from '@/components/ui/button';8import { cn } from '@/lib/utils';910type ToolbarSize = 'sm' | 'reg' | 'lg';11type ToolbarShape = 'square' | 'circle';1213interface ToolbarContextValue {14 size: ToolbarSize;15 shape: ToolbarShape;16 boxed: boolean;17 orientation: 'horizontal' | 'vertical';18}1920const ToolbarContext = React.createContext<ToolbarContextValue>({21 size: 'reg',22 shape: 'circle',23 boxed: false,24 orientation: 'horizontal',25});2627type ToolbarGapClass = 'gap-1' | 'gap-2' | 'gap-3';2829function toolbarGapClass({30 boxed,31 shape,32 size,33}: Pick<ToolbarContextValue, 'boxed' | 'shape' | 'size'>): ToolbarGapClass {34 if (size === 'lg') return 'gap-3';35 if (size === 'reg' && shape === 'circle' && !boxed) return 'gap-1';36 return 'gap-2';37}3839// Negative margin cancels the flex gap before the separator (Figma spacer-on-prior-item).40// Only use between two items — first/last overflows the container. Keys must match41// every class `toolbarGapClass` can return.42const toolbarSeparatorGapOffset: Record<43 ToolbarGapClass,44 { horizontal: string; vertical: string }45> = {46 'gap-1': { horizontal: '-ms-1', vertical: '-mt-1' },47 'gap-2': { horizontal: '-ms-2', vertical: '-mt-2' },48 'gap-3': { horizontal: '-ms-3', vertical: '-mt-3' },49};5051function toolbarSeparatorOffsetClass(context: ToolbarContextValue) {52 const offset = toolbarSeparatorGapOffset[toolbarGapClass(context)];53 return context.orientation === 'horizontal'54 ? offset.horizontal55 : offset.vertical;56}5758const toolbarIconSizeMap: Record<ToolbarSize, 'icon-sm' | 'icon' | 'icon-lg'> =59 {60 sm: 'icon-sm',61 reg: 'icon',62 lg: 'icon-lg',63 };6465const toolbarIconShellSizeMap: Record<ToolbarSize, 'sm' | 'default' | 'lg'> = {66 sm: 'sm',67 reg: 'sm',68 lg: 'default',69};7071const toolbarSeparatorLengthMap: Record<ToolbarSize, string> = {72 sm: 'h-5',73 reg: 'h-7',74 lg: 'h-8',75};7677const toolbarSeparatorWidthMap: Record<ToolbarSize, string> = {78 sm: 'w-2',79 reg: 'w-2',80 lg: 'w-3',81};8283const toolbarSeparatorHeightMap: Record<ToolbarSize, string> = {84 sm: 'h-2',85 reg: 'h-2',86 lg: 'h-3',87};8889const toolbarSeparatorCrossSpanMap: Record<ToolbarSize, string> = {90 sm: 'w-6',91 reg: 'w-7',92 lg: 'w-8',93};9495const toolbarVariants = cva('inline-flex w-fit items-center', {96 variants: {97 boxed: {98// … truncated
What it pulls in
npm packages
Other registry items
