Skip to content

Commit 425d022

Browse files
pawelgrimmclaude
andcommitted
docs: add registry usage notes to README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b1b1188 commit 425d022

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,34 @@ If you prefer to include static files grab the [minified build from the dist fol
3838
<link rel="stylesheet" type="text/css" href="./node_modules/@doist/reactist/styles/reactist.css" />
3939
```
4040

41+
# Registry (shadcn/ui)
42+
43+
Reactist is also available as a [shadcn/ui registry](https://ui.shadcn.com/docs/registry), distributing component source files (TypeScript + CSS Modules) directly into your project.
44+
45+
```sh
46+
npx shadcn add https://doist.github.io/reactist/r
47+
```
48+
49+
## Setup
50+
51+
Your bundler must support CSS Modules (Vite, Next.js, and webpack do by default). Add a path alias so registry imports resolve correctly:
52+
53+
```json
54+
{
55+
"compilerOptions": {
56+
"paths": {
57+
"@reactist/*": ["./src/components/reactist/*"]
58+
}
59+
}
60+
}
61+
```
62+
63+
## Mixing npm and registry
64+
65+
Do not import the same component from both `@doist/reactist` (npm) and the registry. Each source applies its own CSS Module scoping, so duplicate components will have conflicting styles.
66+
67+
Different components from different sources (e.g., Button from npm, Box from registry) work fine — CSS Modules scope independently. Migrate one component at a time.
68+
4169
# Changelog
4270

4371
You can find our changelog [here](./CHANGELOG.md).

0 commit comments

Comments
 (0)