Installation
Every component is a source file the shadcn CLI copies into your project. Check the requirements, add the registries once, then install anything in one command. The theme is optional: see Theming.
Requirements and compatibility
- React 19. Components take
refas a plain prop (noforwardRef), which React 18 doesn't support. - Tailwind CSS v4 only. The installed CSS uses v4's cascade layers and theme variables; Tailwind v3 projects are not supported.
- A
components.json(runnpx shadcn@latest initif you don't have one) and the@/*import alias pointing at your source root. Tested with shadcn CLI 4.21.0. - Bundler or ESM module resolution (
"moduleResolution": "bundler"intsconfig.json, the Next.js and Vite default): some dependencies, such as @tanstack/react-table v9, are ESM-only. - Tested in Next.js (Base UI and Radix projects) and Vite (Radix). Other React 19 setups with Tailwind v4, such as React Router or Astro with React, should work but are untested.
- Current browsers: Lumen uses
color-mix(),:has()and cascade layers (Chrome and Edge 111+, Safari 16.4+, Firefox 121+).
A few items are written against a current major of a library. If your app is on an older major (check package.json), it has to move to this one to use them, so check that the rest of your app works with it first:
@tanstack/react-tablev9 (upgrade from v8 or older; ESM-only, so the project needs bundler or ESM module resolution): Data Explorer, Customer Intelligence, SaaS Analytics.react-day-pickerv10 (upgrade from v9 or older): Calendar, Date Picker, Filter Bar, Data Explorer, Date Compare, Customer Intelligence, SaaS Analytics.react-resizable-panelsv4 (upgrade from v3 or older): Resizable, Split View.
1. Add the registries
Add both registries to components.json. The Pro one only works with a token, but adding it now means you never have to touch this file again. With them, @beautiful-ui/<name> and @beautiful-ui-pro/<name> install the build that matches your style: radix-*, new-york and default get Radix, base-* gets Base UI.
{
"registries": {
"@beautiful-ui": "https://beautiful-ui.dev/r/{style}/{name}.json",
"@beautiful-ui-pro": {
"url": "https://beautiful-ui.dev/r/pro/{style}/{name}.json",
"headers": { "Authorization": "Bearer ${BEAUTIFUL_UI_TOKEN}" }
}
}
}2. Install a component
Free components also install by URL with no setup. The URL names the build, so use the one for your project's primitives (the style in components.json):
npx shadcn@latest add https://beautiful-ui.dev/r/lumen-button.json https://beautiful-ui.dev/r/lumen-switch.jsonnpx shadcn@latest add https://beautiful-ui.dev/r/radix-nova/lumen-button.json https://beautiful-ui.dev/r/radix-nova/lumen-switch.jsonnpx shadcn@latest add @beautiful-ui-pro/lumen-commandThe bare URL always installs the Base UI build, of the item and of its dependencies, so a Radix project needs the /r/radix-nova/ URL or the registries. Pro items need your key in BEAUTIFUL_UI_TOKEN (see Pro setup).
Components land in components/ui/lumen/ as source you own, with shared code in lib/beautiful-ui/lumen/. The first one also adds Lumen's foundation (its --lumen-* tokens, keyframes and motion levels) to your global stylesheet. Each component's styles install into @layer components, so your Tailwind classes always win. Component installs don't change your shadcn tokens.
3. Use it
import { Button } from "@/components/ui/lumen/button";
export default function Page() {
return <Button>Create workspace</Button>;
}Sound (optional)
Lumen components mark their moments (a press, a toggle, a success) but ship no audio code: installing them is silent. To hear them, install the sound provider and mount it once. The audio engine loads only when a provider is mounted and sound is on, and nothing plays before the first click or key press.
npx shadcn@latest add https://beautiful-ui.dev/r/glass-sound.jsonimport { GlassSoundProvider, GlassSoundToggle } from "@/components/beautiful-ui/glass-sound";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{/* clicks="components": only Lumen components answer. The default, "all", adds a tap to every button and link. */}
<GlassSoundProvider clicks="components">
<header>
{/* The mute control. The choice is saved in localStorage ("beautiful-ui-sound"). */}
<GlassSoundToggle />
</header>
{children}
</GlassSoundProvider>
</body>
</html>
);
}defaultMuted starts silent until the visitor turns sound on; sound={false} silences one component, and data-sound="off" silences everything inside an element. See Sound for every option.
Phones and overlays
Components are responsive; Sidebar becomes a sheet below 768px. Overlays (dialogs, menus, popovers) portal to document.body. If you render Lumen inside a scoped container or a shadow root, wrap it in LumenPortalContext so overlays keep its tokens.
Next
- Theming: keep your palette, or use Lumen's.
- Pro setup to install Pro items.
- AI and MCP so your AI tools use Beautiful UI for you.