Installation
Prisma UI components are installed individually via the shadcn CLI. Each component is a self-contained registry JSON — the CLI handles downloading, placing files, and installing dependencies automatically.
Prerequisites
Section titled “Prerequisites”Your project needs shadcn/ui initialized. If you have not done so yet:
npx shadcn@latest initAdding a component
Section titled “Adding a component”Install any component from its registry URL. For example, to add the Button:
npx shadcn@latest add https://joaocarmassi.com/components/button.jsonpnpm dlx shadcn@latest add https://joaocarmassi.com/components/button.jsonnpx shadcn@latest add https://joaocarmassi.com/components/button.jsonbunx --bun shadcn@latest add https://joaocarmassi.com/components/button.jsonThe CLI will:
- Download the component source files into your
components/uidirectory. - Install any npm dependencies (e.g.
class-variance-authority). - Resolve registry dependencies (e.g. card components required by card effects).
Automatic theme detection (optional)
Section titled “Automatic theme detection (optional)”Direct URLs always serve the radix-vega variant. The style-aware components (Button, Badge, and Floating Label Input) also ship variants for every shadcn style — to have the CLI pick the one matching your theme automatically, add the @prisma namespace to the registries block of your project’s components.json once:
{ "$schema": "https://ui.shadcn.com/schema.json", "style": "radix-vega", "registries": { "@prisma": "https://joaocarmassi.com/components/{style}/{name}.json" }}Then install by name:
npx shadcn@latest add @prisma/buttonpnpm dlx shadcn@latest add @prisma/buttonnpx shadcn@latest add @prisma/buttonbunx --bun shadcn@latest add @prisma/buttonThe {style} placeholder is replaced by the CLI with the style field already present in your components.json, so every component arrives sized and shaped for your theme. See Styles & Themes for the supported styles and the details.
You can also pin a style manually without the namespace by including the style folder in the direct URL: /components/radix-nova/button.json.
Shared styles
Section titled “Shared styles”Several components (Button, Badge, Flip Card, Rainbow Border, Shine Border) rely on a shared style.css file that ships alongside them. It defines keyframe animations and [data-variant] CSS custom properties used by effects like shine, pulsating, and rainbow.
The CLI installs this file automatically at components/ui/style.css.
Custom variant colors
Section titled “Custom variant colors”Prisma UI uses data-variant attributes to drive per-variant animation colors. The default style.css maps each variant to a CSS custom property:
[data-variant='default'] { --pulse-color: var(--primary);}[data-variant='destructive'] { --pulse-color: var(--destructive);}[data-variant='secondary'] { --pulse-color: var(--secondary-foreground);}[data-variant='outline'] { --pulse-color: var(--ring);}[data-variant='ghost'] { --pulse-color: var(--ring);}You can extend this pattern for your own custom variants by adding a new [data-variant='...'] selector in the same file:
[data-variant='success'] { --pulse-color: var(--success);}Then use it with any component that supports the variant prop and effects.