Getting started
The monorepo publishes two packages. Install whichever you need — the component
library depends on the foundation package, so installing @rtorcato/shadcn-ui
pulls @rtorcato/react-common in automatically.
| Package | Install when you want… |
|---|---|
@rtorcato/react-common | Headless hooks, the cn class-merge utility, or ThemeProvider — zero UI. |
@rtorcato/shadcn-ui | Pre-built shadcn/ui components (also brings in react-common). |
Install
These docs describe @rtorcato/react-common 1.x and @rtorcato/shadcn-ui 2.x.
# Foundation only (hooks + cn + ThemeProvider)
pnpm add @rtorcato/react-common
# Components (depends on react-common)
pnpm add @rtorcato/shadcn-ui
With npm:
npm install @rtorcato/react-common
npm install @rtorcato/shadcn-ui
What changed in each release is in the package changelogs: react-common and shadcn-ui.
Requirements
- Node.js 24 or newer (
engines.node >=24). Node 22 installs warn, and fail underengine-strict. - React and react-dom
^19.2.8, thereact-commonpeer range.shadcn-uidepends onreact-common, so it needs the same.
Install the peers you don't already have:
# react-common
pnpm add react@^19.2.8 react-dom@^19.2.8
# shadcn-ui additionally needs
pnpm add lucide-react tailwindcss tw-animate-css
Import what you need
Everything is exposed through subpath imports so bundlers tree-shake the rest.
// Foundation package — barrel export
import { cn, useIsMobile, usePrevious, ThemeProvider } from '@rtorcato/react-common'
// Components — one subpath per component
import { Button } from '@rtorcato/shadcn-ui/components/ui/button'
import { Card, CardContent } from '@rtorcato/shadcn-ui/components/ui/card'
import { DataTable } from '@rtorcato/shadcn-ui/components/ui-extended/data-table'
If you're using the components, import the stylesheet once at your app root — see Tailwind setup. For dark mode and theming, see Theming.