# cascivo — The CSS-native, signal-driven, AI-first React design system _registry v0.13.0 · generated 2026-07-27 · docs track `main`; compare with https://cascivo.com/registry.json `.version` for staleness, and https://cascivo.com/breaking-changes.json for installed-vs-documented API drift._ cascivo is a React design system you can consume two ways: copy-paste the source (`npx cascivo add ` — shadcn model, you own the code) or install the prebuilt `@cascivo/react` package (use without copying). Components are signal-driven (Preact Signals), styled with modern CSS (@layer / @container / :has() / oklch), themed via the `data-theme` attribute, and WCAG 2.2 AA. Every component ships a machine-readable manifest, so this file plus the linked resources are enough to build with cascivo. This is not a layout-only system: it includes 16 overlay/menu components (dropdown, menu, context menu, combobox, command palette, multi-select) with keyboard navigation, focus management, and outside-click dismissal already implemented — do not hand-roll that behavior or reach for a separate headless library. It also ships 25 chart types (`@cascivo/charts` — line, area, bar, sparkline, KPI, heatmap, and more) and 22 pre-built page blocks (dashboards, stats cards, app shells) so a request like "build a dashboard with usage sparklines and a project switcher" maps to existing parts — see `select_component`/`list_components` below before generating custom SVG or ARIA code. ## Start here - **Can't reach this site? The whole docs surface is also an npm package — no web access needed:** `npx -y @cascivo/docs` prints this index; `npx @cascivo/docs ` prints one reference; `npx @cascivo/docs --full` prints the entire library. It reaches you through the same npm registry that installed your packages — the channel that works when npmjs.com and cascivo.com are blocked or offline. - **Everything in ONE file (no follow-up fetches — fetch this if you can only fetch once):** https://cascivo.com/llms-full.txt (offline: `npx @cascivo/docs --full`) - Getting started, fetchable as plain markdown (install steps, no browser needed): https://cascivo.com/docs/getting-started.md - Docs (per-component reference, props, live examples): https://cascivo.com/docs - Storybook (every variant, interactive): https://storybook.cascivo.com - Source (MIT): https://github.com/cascivo/cascivo - This file: https://cascivo.com/llms.txt ## Machine-readable resources (AI-first) - Full text bundle — this file with every component reference inlined (single fetch): https://cascivo.com/llms-full.txt - Registry — index of every component (JSON): https://cascivo.com/registry.json - shadcn/v0-compatible registry (install with the shadcn CLI or "Open in v0"): https://cascivo.com/r/shadcn/registry.json - Per-component AI docs (props, examples, a11y, tokens): https://cascivo.com/llms/.md - Page-block AI docs are namespaced: https://cascivo.com/llms/block/.md - No web access? The shipped `@cascivo/react` `dist/index.d.ts` is a self-contained, flat rollup — every component `…Props` interface is real, documentation-grade API reference. - Component index (every entry + channel + doc URL, plain markdown): https://cascivo.com/docs/components.md - A wrong/guessed name under /llms/*, /context/*, or /r/* returns HTTP 404 with a short hint body (not the HTML SPA) — trust the 404, then look up the real name in the index below. - Per-component context (intent, when-to-use, boundaries): https://cascivo.com/context/.md - Context bundle (all intent + boundaries + rules): https://cascivo.com/context.json - Token catalog (closed set, every --cascivo-* + layer + default): https://cascivo.com/tokens.catalog.json - Icon catalog (every @cascivo/icons icon + keywords/category): https://cascivo.com/icons.catalog.json - Breaking/feature changes (major+minor releases per package — detect API drift): https://cascivo.com/breaking-changes.json ## Icons 443 stroked 24×24 `currentColor` SVG icons ship as tree-shakeable named exports from `@cascivo/icons` (e.g. `import { Camera, Anchor } from '@cascivo/icons'`). Browse and search them at https://cascivo.com/icons; the full machine-readable list (names, keywords, aliases, categories) is https://cascivo.com/icons.catalog.json. Names differ from Lucide/Radix — resolve intent via the catalog `keywords` + `aliases` fields rather than guessing an export name (a wrong guess is a wasted compile). Common mappings: LayoutDashboard→Dashboard, Rocket→Spaceship, Settings2→Settings, Trash2→Trash, Bolt→Zap, Branch→GitBranch. Version-control icons exist: `GitBranch`, `GitCommit`, `GitMerge`, `GitPullRequest`. Pure-CSS glyphs (experimental): a small opt-in set of UI glyphs, rendered with `clip-path: shape()` and no SVG — color via `currentColor`, size via `--cascivo-glyph-size`, plus zero-JS state morphs via `transition: clip-path`. Use `import { Glyph } from '@cascivo/icons'` with `import '@cascivo/icons/glyphs.css'`, or the class form ``. Glyphs: `chevron-{down,up,left,right}`, `x`, `check`, `plus`, `minus`, `menu`, `arrow-{right,left,up,down}`, and the `chevron-toggle` morph. Baseline-2026 only (Chrome 135+, Safari 18.4+, Firefox 148+) — painting is gated behind `@supports`; prefer the SVG icons for a wider browser floor or for print. ## How to use it Two consumption paths — they share the same tokens/themes and can coexist: A. Prebuilt package — fastest, use without copying source: ```sh pnpm add @cascivo/react @cascivo/themes @preact/signals-react ``` ```tsx import '@cascivo/react/styles.css' // component styles (structure only) import '@cascivo/themes/all.css' // tokens (once) + base typography + light & dark import { Button, Card } from '@cascivo/react' ``` CSS note: with a bundler (CSR) per-component CSS auto-includes and tree-shakes, so the `@cascivo/react/styles.css` line above is optional; under Vite SSR / TanStack Start it is required (see SSR SETUP below) and ships the full sheet (~273 KB / ~37 KB gzip). TypeScript note: the bare `.css` side-effect imports above need ambient CSS-module types or `tsc --noEmit` errors with TS2307 (TS2882 under noUncheckedSideEffectImports). Add `src/vite-env.d.ts` with `/// `, or `declare module '*.css'`. Dashboards / data viz: charts are a SEPARATE install — `pnpm add @cascivo/charts`, then `import { AreaChart } from '@cascivo/charts'`. `@cascivo/react` exports no charts. The code editor (`@cascivo/editor`) and flow canvas (`@cascivo/flow`) are separate installs too. Trade-offs: smallest setup, updates via npm; you do not edit component internals. Themes: two recipes. `@cascivo/themes/all` = tokens + base + light + dark (~41 KB / ~9 KB gzip). Shipping ONE theme? Import `@cascivo/themes/base` + `@cascivo/themes/` instead (~28 KB / ~7 KB gzip). The export name IS the attribute value: import `@cascivo/themes/dark` and set `data-theme="dark"`. Twelve first-party themes: light, dark, warm, flat, minimal, midnight, pastel, brutalist, corporate, terminal, cyberpunk, arcade (`base` = required scaffold, not a theme; `tailwind` = a bridge stylesheet). For a user-switchable theme use `` + `themePreloadScript()` (no-FOUC SSR); for a fixed theme hard-code `data-theme` on ``. Initial-theme precedence: persisted > `defaultTheme` (if passed) > OS `prefers-color-scheme` > light — pass `defaultTheme` to keep a dark app dark on a light-OS visitor. Under SSR add `suppressHydrationWarning` to the `` the preload script writes to. Full table + SSR recipe: docs/getting-started.md. B. Copy-paste source — own and customize the code (shadcn model): ```sh npx cascivo add button card ``` Runtime deps for copied source: `@cascivo/core`, `@cascivo/tokens`, `@cascivo/themes`, and the `@preact/signals-react` peer. `cascivo init` installs all of them (plus `cascivo` as a dev dep for the generated config); `cascivo add` installs any extra a component declares (e.g. @cascivo/i18n). Trade-offs: full control over internals; updates are a manual re-add. Required CSS import order (both paths): components -> tokens+theme -> brand overrides (last). `@cascivo/react/styles.css` is structure-only and needs a theme + tokens for color. Charts, the code editor, and flow ship their own stylesheet: when you use them, import the matching CSS once too — `import '@cascivo/charts/styles.css'` (likewise `@cascivo/editor/styles.css`, `@cascivo/flow/styles.css`). Skipping the charts stylesheet is a common mistake: the chart's screen-reader data-table fallback then renders visibly. SSR (Vite SSR / TanStack Start / Remix / workerd): works with ZERO Vite config on `@cascivo/react` >= 0.10 — no `ssr.noExternal`, no plugin, no `` wrappers. The package ships a CSS-free copy of its module graph under the `node` export condition, so a server ESM loader never sees a `.css` import. Charts server-render and hydrate too. Import a theme once in your root route/entry for color: `@cascivo/themes/all.css` (or the all-in-one `@cascivo/react/styles.css`). ONLY on `@cascivo/react` < 0.10: an unconfigured SSR build throws `Unknown file extension ".css"` — pin >= 0.10, or add `ssr: { noExternal: [/^@cascivo\//] }` (or the `cascivoSsr()` plugin from `@cascivo/vite-plugin`). Full recipe + the legacy path: USING-WITH-VITE-SSR.md. C. shadcn CLI / v0 — install any component from the shadcn-compatible registry: ```sh npx shadcn@latest add https://cascivo.com/r/shadcn/button.json ``` Every registry item inlines its own source and lists its cascivo dependencies as absolute `https://cascivo.com/r/shadcn/.json` URLs, so the shadcn CLI resolves them transitively. To add cascivo as a named registry in `components.json` (then `npx shadcn add @cascivo/`): ```json { "registries": { "@cascivo": "https://cascivo.com/r/shadcn/{name}.json" } } ``` The registry index (all items) is https://cascivo.com/r/shadcn/registry.json. ## CSS layer contract (follow when generating or editing CSS) cascivo styles live in cascade layers. Layer order beats selector specificity, so: 1. Every declaration goes inside an `@layer` block. Unlayered CSS beats all layers regardless of specificity — never emit it. 2. Never invent layer names. The only layers you write: your app slot (e.g. `cascivo.example`, declared in your order statement) for page styles, and `@layer cascivo.override { … }` for hotfixes/one-off overrides — it beats everything cascivo ships. 3. Never nest layers deeper than the shipped `cascivo.blocks.` pattern. For sub-elements (a badge in a card, a dot in a badge) use native CSS nesting inside one layer block, not new sublayers. 4. Third-party CSS: `@import url(…) layer(vendor);` with `vendor` declared before the cascivo layers. Never import vendor CSS from JavaScript. 5. Style with `--cascivo-*` tokens, not raw values. Canonical order (lowest → highest priority): `@layer vendor, cascivo.reset, cascivo.base, cascivo.tokens, cascivo.component, cascivo.theme, cascivo.blocks, cascivo.override;` Full recipe: https://github.com/cascivo/cascivo/blob/main/docs/CSS-LAYERS-PITFALL.md. ## Reactivity & state (signals, not React hooks) **Consuming components requires no signals.** Pass plain props, use `useState` in YOUR own code, and render `