Installation#installation
Prerequisites#prerequisites
- React 19+
- @stylexjs/stylex
- @base-ui/react
- A JS bundler with Stylex plugin support (Vite, Next.js, Webpack)
- shadcn CLI v4+
1. Configure the Registry#1-configure-the-registry
Add the Blenx UI registry to your project's components.json:
{ "$schema": "https://ui.shadcn.com/schema.json", "style": "new-york", "rsc": false, "tsx": true, "aliases": { "components": "@/components", "utils": "@/lib/utils", "ui": "@/components/ui", "lib": "@/lib", "hooks": "@/hooks" }, "registries": { "blenx-dev": { "baseUrl": "http://localhost:3001/reg" } } }
2. Install a Component#2-install-a-component
# Using the registry URL directly npx shadcn@latest add http://localhost:3001/reg/button.json # Or using the configured registry name npx shadcn@latest add @blenx-dev/button
3. Required Dependencies#3-required-dependencies
Each component may require installing additional packages:
npm install @stylexjs/stylex @base-ui/react @phosphor-icons/react # Plus optional: react-day-picker, date-fns, react-colorful
4. Configure Stylex#4-configure-stylex
Your bundler must be configured with the Stylex plugin. Components use atomic CSS via Stylex, which requires a build-time transform.
// Example: vite.config.ts import stylex from "@stylexjs/unplugin"; export default defineConfig({ plugins: [ stylex.vite({ ... }), ], });