Skip to content

Getting started

The package is private and workspace-only during its initial design phase.

Add it to a pnpm workspace

json
{ "dependencies": { "raft-ui": "workspace:*" } }

Use a component

tsx
import { Button } from "raft-ui"; export function SaveAction() { return <Button>Save</Button>; }

Component CSS is loaded by the JavaScript entry automatically. No separate global stylesheet import is required.

Language

Built-in strings, such as the screen-reader label of a loading button, are English by default. Switch them with ConfigProvider:

tsx
import { ConfigProvider, zhCN } from "raft-ui"; <ConfigProvider locale={zhCN}>…</ConfigProvider>;

See ConfigProvider.