Skip to main content

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.

PackageInstall when you want…
@rtorcato/react-commonHeadless hooks, the cn class-merge utility, or ThemeProvider — zero UI.
@rtorcato/shadcn-uiPre-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 under engine-strict.
  • React and react-dom ^19.2.8, the react-common peer range. shadcn-ui depends on react-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.