Add components with the shadcn CLI, copy them by hand, or start from the dashboard template.
Dashral needs React 19, Tailwind CSS v4 and TypeScript. Components are copied into your project, so there's no Dashral package to install or update — the code is yours.
Set up your project
Components install with the shadcn CLI, which needs a project with Tailwind CSS, the @/* import alias and a components.json. Any style works, Radix or Base UI, and so does a project full of shadcn components: Dashral goes in a folder of its own. Already have one? Skip to the registry.
Create a project
$ pnpm create next-app@latest my-appSay yes to Tailwind CSS and keep the default
@/*import alias.Initialize shadcn
$ pnpm dlx shadcn@latest initPick any style and preset. This writes
components.json, which the CLI reads to know where files go, and addslib/utils.tsand the theme's CSS variables.
Add the registry
Register Dashral once in components.json. After that you add components by name, e.g. @dashral/button.
{
"registries": {
"@dashral": "https://dashral.com/r/{name}.json"
}
}Prefer not to edit the config? Every component also installs from its full URL:
$ pnpm dlx shadcn@latest add https://dashral.com/r/button.jsonThe full theme
Components bring only the tokens they use, and leave your existing colors alone. For the whole Dashral look — light and dark palette, status colors, chart colors and motion — add the theme. It replaces your color tokens.
$ pnpm dlx shadcn@latest add https://dashral.com/r/dashral-theme.jsonAdd components
Add one or several at once. Everything a component needs comes along: the components it builds on, its npm packages and the theme tokens it uses.
$ pnpm dlx shadcn@latest add @dashral/button @dashral/metric-cardComponents land in components/dashral/, blocks in components/dashral/blocks/, Motion editions in components/dashral/motion/ and the helpers they share in components/dashral/lib/. Your components/ui/ is never touched, so a shadcn Button and Dashral's live side by side. They're your files now: use them like any component of your own.
import { Button } from "@/components/dashral/button"
export default function Page() {
return <Button>Save changes</Button>
}Copy by hand
No CLI? Every file is on the site to copy.
Install the packages
The ones every component shares; a component's page lists any others it needs.
$ pnpm add radix-ui class-variance-authority clsx tailwind-merge lucide-react tw-animate-cssAdd the cn() helper
components/dashral/lib/utils.tsimport { clsx, type ClassValue } from "clsx" import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) }Copy the theme
Copy globals.css into your app and import it once in your root layout.
Copy the component
Open a component, switch Installation to Manual, and copy its source into
components/dashral/. Its page lists the other components it imports.
Dashboard template
Starting a new admin dashboard? Clone the template: every page, component and the theme are included, with no shadcn setup. See it running. Then run pnpm dashral init once, before you change anything: it turns the demo into the start of your own app.
git clone https://github.com/hasralgana/dashral.git my-dashboard
cd my-dashboard
pnpm install
pnpm dashral init
pnpm devIt asks a few questions and changes the code to match. Whatever you don't keep is deleted (the other template, the sample data, the upgrade pages), links to Dashral are turned off, and your answers are saved in .dashral.json. Skip it to keep the whole demo as it is.
| Option | Values | What it does |
|---|---|---|
| --template | classic, inset, both | Which dashboard template to keep. Inset alone moves to /. |
| --pages | demo, blank | The demo pages with sample data, or a blank page and Settings to build on. |
| --languages | all, en | English, Indonesian and Arabic (right to left), or English only. |
| --customizer | keep, remove | The theme customizer in the header. |
| --name | "Your App" | Your app's name, everywhere the template's was: sidebar, sign-in, titles, link previews. |
| --primary--light--dark--card--radius--font | the customizer's options | The look your app starts with. |
Give the answers as flags and it asks nothing. The theme customizer in the live demo writes this command for the look you pick: Copy setup command.
pnpm dashral init --template inset --pages blank --languages en \
--name "Acme" --primary indigo --card softNew releases come to the repository. Commit your work, then bring one in: it merges the release into your code the way init shaped it, keeps what you removed removed, and leaves the result staged for you to review. Where you and the release changed the same lines, it stops and lists the files; fix them and run it again with --continue. It reads .dashral.json, so keep that file.
pnpm dashral updatePro blocks
Pro blocks come with your license. Signed in with Pro, a Pro block's Code tab shows its whole source to copy, and every one is in your dashral-pro repository under packages/blocks/src/. They're built from the same components, so add those as above first. See what's in Pro.