Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Storybook to Pages
name: Deploy Storybook and Registry to Pages

on:
push:
Expand Down Expand Up @@ -50,6 +50,12 @@ jobs:
- name: Build storybook
run: npm run build:storybook

- name: Build registry
run: npm run build:registry

- name: Copy registry into storybook output
run: cp -r public/r docs/r

- name: Setup Pages
uses: actions/configure-pages@v3

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ jobs:
- run: npm run type-check
- run: npm test
- run: npm run build
- run: npm run build:registry
- run: npm run test:registry
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ lib/
coverage/
.vscode/
stats.html
public/
registry/
registry.json
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,36 @@ If you prefer to include static files grab the [minified build from the dist fol
<link rel="stylesheet" type="text/css" href="./node_modules/@doist/reactist/styles/reactist.css" />
```

# Registry (shadcn/ui) — experimental

> **Note:** The shadcn registry is experimental and may change without notice.

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.

```sh
npx shadcn add https://doist.github.io/reactist/r
```

## Setup

Your bundler must support CSS Modules (Vite, Next.js, and webpack do by default). Add a path alias so registry imports resolve correctly:

```json
{
"compilerOptions": {
"paths": {
"@reactist/*": ["./src/components/reactist/*"]
}
}
}
```

## Mixing npm and registry

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.

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.

# Changelog

You can find our changelog [here](./CHANGELOG.md).
Expand Down
Loading
Loading