Componenteditors0.82 KB gzipZero dependencies
Color Token Table
Theme token table: swatch, value, copy action.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add color-token-tableOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { ColorTokenTable } from "@/components/ui/color-token-table"; <ColorTokenTable />Source code
color-token-table.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxcolor-token-table.tsx71 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ColorToken { name: string; value: string; /** CSS variable name, e.g. --accent */ cssVar?: string; usage?: string;} export interface ColorTokenTableProps extends React.HTMLAttributes<HTMLDivElement> { tokens: ColorToken[];} /** Theme token table: swatch + CSS variable + copy action. */Props
| Prop | Type | Description |
|---|---|---|
| tokens | ColorToken[] | Configures tokens. (Default: []) |