Installation
How to install and configure magicui-solid components.
magicui-solid components are distributed via the shadcn registry and can be installed using the shadcn CLI.
Prerequisites
Section titled “Prerequisites”- A SolidJS project with Tailwind CSS v4 configured
- Node.js 18+
Add the Registry
Section titled “Add the Registry”Add the @magicui-solid registry to your project’s components.json:
{ "$schema": "https://ui.shadcn.com/schema.json", "style": "default", "rsc": false, "tsx": true, "tailwind": { "config": "", "css": "src/app.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" }, "aliases": { "components": "@/components", "utils": "@/lib/utils", "ui": "@/components/ui", "lib": "@/lib", "hooks": "@/hooks" }, "iconLibrary": "lucide", "registries": { "@magicui-solid": "https://axuj.github.io/magicui-solid/r/{name}.json" }}Or use the CLI to add the registry:
pnpm dlx shadcn@latest registry add @magicui-solid=https://axuj.github.io/magicui-solid/r/{name}.jsonbunx shadcn@latest registry add @magicui-solid=https://axuj.github.io/magicui-solid/r/{name}.jsonyarn dlx shadcn@latest registry add @magicui-solid=https://axuj.github.io/magicui-solid/r/{name}.jsonnpx shadcn@latest registry add @magicui-solid=https://axuj.github.io/magicui-solid/r/{name}.jsonInstall a Component
Section titled “Install a Component”SolidJS projects can’t use shadcn init (it’s designed for React). Instead, the base theme is distributed as a registry item (@magicui-solid/theme) and installed automatically as a dependency when you add any component:
pnpm dlx shadcn@latest add @magicui-solid/terminalbunx shadcn@latest add @magicui-solid/terminalyarn dlx shadcn@latest add @magicui-solid/terminalnpx shadcn@latest add @magicui-solid/terminalThat’s it. The CLI installs the component, its dependencies, and automatically injects the entire theme into your app.css: all CSS variables (:root/.dark), Tailwind v4 color mappings (@theme inline), radius scale, and animation keyframes (e.g. animate-marquee). No manual configuration required.
Note: If your
app.cssalready contains shadcn variables, the CLI keeps your existing values and only appends what’s missing.
Manual Installation
Section titled “Manual Installation”Alternatively, you can copy the component source directly from the GitHub repository.
You’ll also need to install the required dependencies and add the theme manually:
npm install @solid-primitives/intersection-observer clsx tailwind-mergeCopy the theme variables into your (see the [theme registry item):