Materializr
오픈소스 파라메트릭 3D CAD로 제약 스케치·솔리드 모델·나사·SVG·텍스트 조각·STL/STEP 내보내기를 지원합니다
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Headless, accessible React components — plus design tokens and a CLI to wire them up
A design system you assemble, not adopt wholesale. Ship unstyled,
WAI-ARIA-correct components, bring your own styles (or pull ready-made
ones), sync design tokens from Figma, and install it all with one command.README 전문 보기 ↗A design system you assemble, not adopt wholesale. Ship unstyled, WAI-ARIA-correct components, bring your own styles (or pull ready-made ones), sync design tokens from Figma, and install it all with one command.
Documentation → primitiv-ui.dev
asChild composition.primitiv add button drops a styled component — one of
63 in the registry, from framed controls up through full composites
like Card and NavigationMenu — straight into your Vite or Next.js project,
as code you own, not a black box.| Package | Version | What it is |
|---|---|---|
@primitiv-ui/react | Headless, accessible React components (zero styles) | |
@primitiv-ui/icons | 49 fill-based SVG icons that inherit currentColor | |
@primitiv-ui/tokens | DTCG design-token layer + Figma → DTCG transform | |
primitiv-ui | The primitiv CLI (add, init, tokens, theme, list) | |
create-primitiv-ui | npm create primitiv-ui project scaffold |
Set up Primitiv in a Vite or Next.js project:
npm create primitiv-ui@latest
...or add it to an existing app and pull in components as you need them:
npm i -D primitiv-ui
npx primitiv add button
Just want the headless components? Install the library directly:
npm i @primitiv-ui/react
import { Button } from "@primitiv-ui/react";
export function Save() {
return <Button onClick={save}>Save</Button>;
}
[!NOTE] The CLI runs a small native binary, so it won't work inside StackBlitz / WebContainer (their in-browser Node can't execute native binaries). Use a local, Codespace, or Docker environment.
@primitiv-ui/react exports 46 headless components and 3 hooks
(useLocalStorage, useMediaQuery, usePagination) built on the WAI-ARIA authoring patterns.
See the component index for the full list
and per-component docs.
On top of the headless library, the registry ships 63 styled, copy-in components — framed controls (Button, Input, Select), prose (Blockquote, Figure, Table), and full composites (Card, NavigationMenu, ConfirmDialog, Avatar Group) among them. Browse what's installable with:
npx primitiv list
or see registry/components directly. Planned
components and outstanding workbench examples live in
ROADMAP.md.
This is a Rust + pnpm monorepo. Two names, one repo: Primitiv is the product; Harmoni is the colour engine inside it.
primitiv/
├── crates/
│ ├── harmoni-core/ # Pure-Rust palette engine + contrast audit
│ ├── harmoni-wasm/ # wasm-bindgen adapter (browser runtime)
│ ├── primitiv-cli/ # The `primitiv` CLI (add / init / tokens / theme / list)
│ └── primitiv-emit/ # Pure DTCG → CSS / SCSS / Tailwind emitter
├── packages/
│ ├── react/ # Headless React component library
│ ├── icons/ # Fill-based SVG icon library
│ └── tokens/ # DTCG token layer + Figma sync transform
├── npm/ # The CLI wrapper, scaffold, and per-platform binaries
└── apps/
├── workbench/ # React dev surface for iterating on palettes
├── docs-site/ # primitiv-ui.dev — the documentation site (Next.js)
├── docs/ # Documentation (VitePress)
├── kitchen-sink/ # Every registry component, installed via the CLI
└── primitiv-sync-figma-plugin/ # Back Figma variables up as DTCG JSON
Primitiv's colour comes from Harmoni, a perceptually-uniform (OkLCH)
palette engine written in Rust and exposed to the browser through
WebAssembly. Adapters program against the small harmoni_core::api
surface. Full engine docs — generation, neutral ramps, contrast audit, and
the ColorInput parsing path — live in the
harmoni-core README.
Prerequisites:
wasm-pack — only
needed to rebuild the wasm package for the workbench apppnpm install
cargo test --workspace # Rust test suite
pnpm --filter @primitiv-ui/react qa:units # React tests + coverage
Rebuild the wasm package and start the workbench dev server:
pnpm run build:wasm # regenerates crates/harmoni-wasm/pkg/ (not tracked in git)
pnpm run dev
harmoni_core::api — extend the api module
rather than reaching into lower-level modules.Releasing is documented in RELEASING.md.
Primitiv — the @primitiv-ui/* packages and the primitiv CLI — is released
under the MIT License. See LICENSE.