@pinecall/react-theme
v0.2.4
Published
Pinecall design system — canonical React theme & component library (the 'chassis' UI). Reusable across pinecall, e-sign, and any admin product.
Readme
@pinecall/react-theme
The Pinecall design system as a reusable React package — the "chassis" UI. One
token system (light/dark, warm neutrals, orange accent), one stylesheet, and a
set of typed, className-driven components. Drop it into any admin product
(pinecall playground, e-sign, …) and re-skin by overriding --accent.
Install (local workspace)
// package.json
"dependencies": { "@pinecall/react-theme": "file:../react-theme" }Then npm install. After editing the package, rebuild it: npm run build in
react-theme/ (the consumer reads dist/).
Use
// app root (once)
import "@pinecall/react-theme/styles.css";
import { ThemeProvider, themeBootScript } from "@pinecall/react-theme";
// in <head>, before paint, to avoid a flash:
<script dangerouslySetInnerHTML={{ __html: themeBootScript("pc-theme", "dark") }} />
// anywhere
import { Button, Card, Badge, Table, Th, Tr, Td } from "@pinecall/react-theme";
<Button variant="primary" icon={<Plus size={14} />}>New agent</Button>
<Badge tone="success" dot>connected</Badge>Theme tokens
All surfaces use CSS variables. Override anywhere (:root, a container, a
product). Key ones: --accent, --ink/--ink-2/3/4, --surface, --bg,
--inset, --border/--border-2, --success/--danger/--info/--warning/--orchid,
--shadow-1/2/3, --r-sm/md/lg/xl, --font-sans/--font-mono.
Toggle dark mode by setting data-theme="dark" (or "light") on <html> —
ThemeProvider/ThemeToggle do this for you.
Legacy short aliases (--card --fg --fg2.. --border2 --sunset --moss --sky
--rose) are mapped to canonical tokens so older markup keeps working.
Components
Primitives: Button IconButton Field Input Textarea Select
Checkbox Toggle. Feedback: Badge Tag Alert Toast EmptyState.
Navigation: Tabs Segmented Chips Menu/MenuItem/MenuLabel/MenuSeparator.
Layout: Card PageHeader Stat StatGrid Sparkline. Overlays/data:
Modal Table/THead/Th/Tr/Td/TableHeader. AI: VoiceCallCard
AgentChat Waveform Typing. Shell: AppShell Sidebar/SidebarUser
Topbar ThemeProvider/useTheme/ThemeToggle.
See the global skills (pinecall-ui-*) for copy-paste recipes per component.
