Documentation
Installation
Put components in a project: by command or by hand.
What a project needs
React 19, Tailwind CSS 4, and the @/ import alias pointing at the project's source folder. A Next.js app has all three. Components go in src/components/<group>/, helpers in src/lib/ and the theme in src/styles/rivier-ui.css.
With the shadcn command
This site serves the library as a registry in the shadcn format, under the name @rivier-ui. Name it once in the project's components.json:
{
"registries": {
"@rivier-ui": "https://ui.rivier.ai/r/{name}.json"
}
}Then add components by name. What a component depends on, and the theme, come with it, and the packages it needs are installed.
npx shadcn@latest add @rivier-ui/button @rivier-ui/dialogOne thing that command does not do, so do it once by hand: import the theme after Tailwind in the global stylesheet.
@import "tailwindcss";
@import "tw-animate-css";
@import "../styles/rivier-ui.css";Checked with the shadcn command 4.23.0 on 22 November 2026.
With Rivier UI's own command
The library's own command copies the files with their headers, puts the theme in place, imports it into the global stylesheet, and installs the packages. It never overwrites a file you have changed unless you say overwrite. It runs from a copy of the library, which opens at launch:
npm run ui -- add button dialog dir=<project> # copy them, what they need, and the theme
npm run ui -- add all dir=<project>
npm run ui -- doctor dir=<project> # what is missing or out of placeEvery word it takes is on The command.
By hand
Each component's page has its whole source, the packages it imports and the other items it needs. Copy the file to the place the page names, do the same for the items it lists, install the packages, and add the theme as src/styles/rivier-ui.css.
Use a component
import { Button } from "@/components/ui/button";
export default function Page() {
return <Button>Save</Button>;
}The look comes from the theme: see Theming before changing a component's classes.