cherry 2.0
cherry is a themeable React design system in plain CSS. It ships as @cherry-design-system/react: more than 60 components, a set of --cherry-* design tokens, light and dark mode, and brands built from a single accent color.
- Plain CSS, zero styling runtime. Every component ships static CSS in
@layer cherry. There is no CSS-in-JS and no theme provider. Import one stylesheet, or only the files for the components you render. - Server Components ready. Components without interactivity (Button, Badge, Card, Table, Prose, the layout primitives) render on the server with no client JavaScript. Interactive ones carry
"use client"themselves, so you can import any of them from a Server Component. - Accessible by default. Components meet WCAG 2.2 AA when used as documented. CI runs axe in light and dark, at desktop and 320px widths, with every popup open, and checks focus visibility, focus traps, Windows High Contrast and reflow.
- Light and dark. The mode is a
darkclass on<html>, set before the first paint. Every color token switches with it, so a mode change re-renders nothing. - Brands.
createBrand("acme", { accent: "#5b5bd6" })derives hover, subtle, text and ring shades for both modes as validated plain CSS.
Install
react, react-dom (18.2 or later) and lucide-react are peer dependencies. cherry renders its own icons with lucide-react, and you pass lucide icons to icon props, so install it alongside.
npm install @cherry-design-system/react lucide-reactSet up once
Import the stylesheet, run the init script in <head>, and put cherry-root on <body>. In a Next.js App Router project:
// app/layout.tsx
import "@cherry-design-system/react/styles.css";
import { themeInitScript } from "@cherry-design-system/react/theme-init";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<head>
<script dangerouslySetInnerHTML={{ __html: themeInitScript }} />
</head>
<body className="cherry-root">{children}</body>
</html>
);
}Then use components anywhere:
import { Button, ThemeToggle } from "@cherry-design-system/react";
import { Plus } from "lucide-react";
export default function Page() {
return (
<main>
<Button leadingIcon={<Plus />}>New project</Button>
<Button variant="outline">Learn more</Button>
<ThemeToggle />
</main>
);
}See Installation for Vite and other React setups, router links and fonts.
Explore
Installation
Next.js, Vite, router links, fonts and per-component CSS.
Components
Every component with its props, examples and accessibility notes.
Dark mode
Light, dark and system, the init script and useColorMode.
Brands
Build a brand from one accent color with createBrand.
Colors
Semantic colors for light and dark, and the full palette.
Tokens
Spacing, radius, elevation, motion, layout and typography.
Styling
Override styles with a plain class and build your own components.
Accessibility
What cherry guarantees and what your app must provide.
Skill for AI agents
Teach coding agents to build with cherry correctly.
cherry-design-system/reactOne color in, a design system out. Themeable, accessible React components in plain CSS.2 stars0 forksComing from 1.x
cherry 2.0 replaces cherry-styled-components. Read Migrating from 1.x for the changes to setup, props and components. The 1.x documentation is still available: pick v1 in the version switcher.