Utils
octane/utilsFreeUtility
The cn() class utility (clsx + tailwind-merge).
Live preview
live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/utils.jsonSource
1// Ported from shadcn-ui/ui@4baadbc6517070ae8f8feb2c97037adc2b3055442// apps/v4/registry/bases/radix/lib/utils.ts — unchanged (framework-free).3import { clsx, type ClassValue } from 'clsx';4import { twMerge } from 'tailwind-merge';56export function cn(...inputs: ClassValue[]) {7 return twMerge(clsx(inputs));8}
What it pulls in
npm packages
Files it writes
More from octane
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Theme tokenstheme | octane | Utilities | Free | no deps | |
| Typestypes | octane | Utilities | Free | no deps |
