Installation
Add components with the designme CLI, as HTML, React or Astro. It copies their source into your project, so you own it.
Before you start
Node 18 or later
To run the CLI.
React 19
For the React components.
An Astro project
For the Astro components. We build and test them with Astro 7.3.
Find a component's install name on its page, or list them all:
npx designme listAdd components
Add them
Terminalnpx designme add status-pill thinking composerEach component lands in its own folder in
./designme, with its.html,.cssand.js. The shared core,core/core.cssandcore/core.js, is added once. Every component also gets ademo.htmlyou can open straight away.Your project - designme/
- core/
- core.css
- core.js
- status-pill/
- status-pill.html
- status-pill.css
- status-pill.js
- demo.html
- thinking/
- thinking.html
- thinking.css
- thinking.js
- demo.html
- composer/
- composer.html
- composer.css
- composer.js
- demo.html
- core/
- designme/
Load them in a page
Load the core and the component's files, and copy in the markup from its
.html:HTML<link rel="stylesheet" href="designme/core/core.css"> <link rel="stylesheet" href="designme/status-pill/status-pill.css"> <!-- the markup from designme/status-pill/status-pill.html --> <script src="designme/core/core.js"></script> <script src="designme/status-pill/status-pill.js"></script>Give them your data
The core renders each component when it scrolls into view and plays its demo. To feed one your own data, change its
.js, or use the React version, which takes props.Every CSS variable the components use starts with
--dm-(--dm-accent,--dm-muted), as in React, so they never meet your page's own, like a shadcn/ui theme's--accentand--muted.
Add them
Terminalnpx designme add status-pill thinking composer --reactThey land in
src/components/designme, orcomponents/designmewhen there is nosrcfolder. Only the shared files they need come with them:designme.cssand a few helpers inlib/.Your project - src/components/designme/
- designme.css
- lib/
- cx.ts
- hits.ts
- hooks.ts
- icons.tsx
- motion.tsx
- glide.ts
- popover.tsx
- status-pill/
- StatusPill.tsx
- status-pill.css
- thinking/
- Thinking.tsx
- thinking.css
- composer/
- Composer.tsx
- composer.css
- src/components/designme/
Import them
Each component imports its own styles, so importing it is all it takes:
Reactimport { StatusPill } from '@/components/designme/status-pill/StatusPill'; <StatusPill state="reading" label="Reading Figma frames" meta="2 of 4" />Drive them from your state
Every component takes
className. Anything a person can change has a controlled pair, likevalueandonValueChange, and adefault…prop for leaving it to the component. Each component's page lists its props.Load Inter and JetBrains Mono for the full look. Without them, the components fall back to the system font.
Every class, CSS variable and animation name starts with
dm-(.dm-panel,--dm-accent), so the components sit beside Tailwind, shadcn/ui or your own CSS without clashing.
Add them
Terminalnpx designme add status-pill thinking composer --astroThey land in
src/components/designme, orcomponents/designmewhen there is nosrcfolder, with the shared core incore/. Each component is an.astrofile with the HTML version's.cssand.jsbeside it.Your project - src/components/designme/
- core/
- designme.css
- core.js
- status-pill/
- StatusPill.astro
- status-pill.css
- status-pill.js
- thinking/
- Thinking.astro
- thinking.css
- thinking.js
- composer/
- Composer.astro
- composer.css
- composer.js
- core/
- src/components/designme/
Use them in a page
Each component brings its own styles and script, so importing it is all it takes:
Astro--- import StatusPill from '../components/designme/status-pill/StatusPill.astro'; --- <StatusPill /> <StatusPill data-style="soft" />It plays its demo from designme.dev. To show your own data, change its
.js. See Astro.
shadcn CLI
Every component is also a shadcn registry item, in its React and Astro versions, so the shadcn CLI can add it to a project set up for shadcn/ui (one with a components.json):
npx shadcn@latest add https://designme.dev/r/shadcn/status-pill.jsonnpx shadcn@latest add https://designme.dev/r/shadcn/astro/status-pill.jsonThe files land in a designme folder in your components folder (the components alias in components.json), laid out as the designme CLI lays them out. The shared core comes along as a registry dependency. The files are copied as they are.
Theme bridge
The theme bridge is a small CSS file that gives the components the colours and corners of a shadcn/ui or Tailwind v4 theme. It is opt-in: without it, the components keep their own look.
npx designme add status-pill --astro --theme-bridge
npx designme add --react --theme-bridge # just the bridgenpx shadcn@latest add https://designme.dev/r/shadcn/theme-bridge.json
npx shadcn@latest add https://designme.dev/r/shadcn/astro/theme-bridge.jsonIt lands beside the shared core: designme/core/theme-bridge.css for HTML, src/components/designme/core/theme-bridge.css for Astro and src/components/designme/theme-bridge.css for React. Load it after the components' CSS, for example in your layout:
---
import '../components/designme/core/theme-bridge.css';
---It reads these variables from your theme and sets our tokens from them, the same names in HTML, React and Astro, on the components only, never on the rest of the page:
| Your theme | Our tokens |
|---|---|
--background | --dm-page, --dm-stage |
--card | --dm-surface, --dm-wash |
--popover | --dm-raised |
--foreground | --dm-fg, --dm-fg2, --dm-hover, --dm-press, --dm-row |
--muted-foreground | --dm-fg2, --dm-muted |
--border | --dm-line, --dm-rail |
--input | --dm-field-line |
--ring | --dm-field-line-strong, --dm-focus |
--secondary | --dm-chip, --dm-soft, --dm-dis-fill, --dm-hover, --dm-press, --dm-wash |
--primary | --dm-accent, --dm-accent-fg, --dm-accent-mark, --dm-accent-2, --dm-accent-bg, --dm-sel |
--primary-foreground | --dm-on-accent, --dm-accent-2 |
--destructive | --dm-bad |
--chart-1 | --dm-c1 |
--chart-2 | --dm-c2 |
--chart-3 | --dm-c3 |
--chart-4 | --dm-c4 |
--chart-5 | --dm-c5 |
--radius | --dm-r-card, --dm-r-lg, --dm-r-in, --dm-r-box, --dm-r-box-sq, --dm-r-sm, --dm-r-field, --dm-r-field-sq, --dm-r-xs, --dm-r-tag, --dm-r-tag-sq |
- Dark mode: a shadcn theme sets its dark values on
.dark, and the bridge passes them on. Keepdata-theme="dark"on<html>in step with.dark, so the components' other tokens, like the status colours and shadows, switch too. - Corners:
--radiussets Soft's named radii. Blueprint keeps its square corners, and the corners a component works out from--dm-rkkeep Soft's own scale. - Contrast: the accent's text and marks take your
--primaryas it is, so check that it reads on your cards. - Your theme's own
--accent,--mutedand the rest stay as they are for your page: our tokens all start with--dm-.
Frameworks
Next.js
App Router: every component file starts with
'use client', so you can render them from server components.Pages Router: import
designme.cssand each component's.cssinpages/_app.tsx, and delete the two CSS imports at the top of those components.React with Vite
Nothing extra to set up.
Astro
Use the Astro components (
--astro), which need no integration. See Astro.Or use the React components as islands: add the React integration with
npx astro add react, and hydrate the components that change over time, for example withclient:visible.
Options
| Option | What it does |
|---|---|
--react | React components instead of HTML, CSS and JavaScript |
--astro | Astro components instead of HTML, CSS and JavaScript |
--theme-bridge | Also add the theme bridge. Works without component names too |
--examples | With --react, an example beside each component that replays its demo from designme.dev |
--dir <path> | Put the files somewhere else |
--force | Replace files you already have |
The CLI downloads each component from designme.dev and skips files that are already there. --force replaces them with the current version, including any changes you made.
This page as Markdown: installation.md