Componenteditors0.82 KB gzipZero dependencies

Color Token Table

Theme token table: swatch, value, copy action.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add color-token-table

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { ColorTokenTable } from "@/components/ui/color-token-table"; <ColorTokenTable />

Source code

color-token-table.tsx + 1 helper

Zero 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

PropTypeDescription
tokensColorToken[]Configures tokens. (Default: [])