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

# Foundation only (hooks + cn + ThemeProvider)
pnpm add @rtorcato/react-common

# Components (depends on react-common)
pnpm add @rtorcato/shadcn-ui

Peer requirements

Both packages target React 19. Install the peers you don't already have:

# react-common
pnpm add react@^19 react-dom@^19

# 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'
import { useToast } from '@rtorcato/shadcn-ui/hooks'

If you're using the components, import the stylesheet once at your app root — see Tailwind setup. For dark mode and theming, see Theming.