Getting Started

(canary — experimental. APIs here can change without notice.)

The install snippet pins to the version you're reading, so on this page it resolves to …@canary.

Install

npm install soft-ui-docs@0.9.90
pnpm add soft-ui-docs@0.9.90
yarn add soft-ui-docs@0.9.90
bun add soft-ui-docs@0.9.90
npx jsr add soft-ui-docs@0.9.90

Define a shape (async)

In canary, defineShape() is async — it resolves fonts/image fills first:

import { defineShape } from 'soft-ui-docs'

const card = await defineShape({ corners: 'rounded', radius: 1 })

Start the dev server

npm run dev
pnpm dev
yarn dev
bun run dev
npm run dev

On 1.0, defineShape() returns synchronously — drop the await. See the 1.0 guide.