Choose your path
How you consume Primitiv
Headless
Behaviour, props and a11y only. No CSS — you own the styling. Ships as an npm package.
npm i @primitiv-ui/reactpnpm add @primitiv-ui/reactyarn add @primitiv-ui/reactbun add @primitiv-ui/reactStyled (registry)
Headless props plus the style-layer contract and CSS variables. Copied into your app.
npx primitiv add buttonpnpm dlx primitiv add buttonyarn dlx primitiv add buttonbunx primitiv add buttonFigma
Spec and redline content — the design library for building in Figma, powered by Harmoni.
Design in FigmaOn every component page
Installing a component
Button
stableReflects the global mode switch — currently Styled:
npx primitiv add buttonpnpm dlx primitiv add buttonyarn dlx primitiv add buttonbunx primitiv add buttonProps
| Prop | Type | Default | Required |
|---|---|---|---|
| asChild | boolean | false | no |
| children | ReactNode | — | no |
| ref | Ref<HTMLButtonElement> | — | no |
| type | "button" | "submit" | "reset" | "button" | no |