Getting started
What Thrum is, what you need, and your first component in two minutes.
Thrum is a component library for React: 168 animated UI primitives, charts, meters, live feeds and 7 complete dashboards (82 free under MIT, 86 Pro), paired with 1,067 MIT stroke icons, tunable Solid and Frosted glass materials, optional synthesised sound, and a built-in MCP server at /api/mcp. Everything installs as plain TypeScript source into your project through the shadcn CLI. Browse them all.
Your first component in two minutes
Add the bar chart in one line from the root of your project:
npx shadcn@latest add https://thrumui.dev/r/bar-chart.jsonUsing pnpm, yarn or bun? The same command for each is on the Installation page.
Then use it. Paste this into any page or component:
import { BarChart } from "@/components/ui/bar-chart";
const data = [
{ label: "1 Dec", value: 318 },
{ label: "2 Dec", value: 274 },
// ...
];
<BarChart
data={data}
label="Orders"
className="h-64"
/>You should see
A chart 256 pixels tall that fills the width of its container. Bars rise cleanly from the baseline without overshoot. Move the pointer over it, or focus it and press the arrow keys, and a readout follows each bar.
If it goes wrong
An import that cannot be found, or a chart with no colour, usually means the project's aliases or Tailwind version differ from what the files expect. Troubleshooting covers each case.
What you need
- React 19. The components are client components built and tested with React 19.
- Tailwind CSS v4. Styling is Tailwind utilities plus your theme's CSS variables.
- A project initialised with shadcn. That means a
components.jsonfile, thecnhelper inlib/utils, and the standard theme variables in your CSS. If you do not have one yet, follow the shadcn installation guide first. - The
motionpackage, version 14. Added automatically for animated components. @base-ui/react@1.9.0. Added automatically for headless interactive primitives such as dialogs, menus, selects, popovers and tooltips.
Any React framework that shadcn supports works. With React Server Components, pass data from the server and the component runs in the browser: see Working with data.
Where things land
The command writes source files into your project and installs any packages they need. For the bar chart that is:
components/ui/bar-chart.tsxlib/thrum-chart.tslib/thrum-motion.tslib/thrum-sound.ts
Where things land
- components/ui/
- components
- components/
- blocks
- components/icons/
- icons
- lib/
- foundations
Components go to components/ui/, blocks go to components/, icons go to components/icons/, and shared foundations go to lib/, following the aliases in your components.json. The shared lib/ files are installed on demand and reused by every component that imports them: lib/thrum-chart.ts (scales, formatting and chart cursor), lib/thrum-motion.ts (durations, springs and reduced-motion hooks), lib/thrum-sound.ts (synthesised sound engine), plus the Pro lib/thrum-dashboard.tsx shared by the dashboard blocks. The optional thrum-theme and thrum-materialitems add CSS variables and frosted glass surface rules to your stylesheet. Nothing else in your project changes.
Sound is off until a visitor turns it on, so a new install is silent. Sound shows how to add the switch.