Skip to content
Porcelana

Getting started

Install Porcelana, add the stylesheet once, and wrap your app in a ThemeProvider.

1. Install

Terminal
npm install @porcelana/ui @porcelana/icons

Peer dependencies: React 18 or 19. Works with Next.js (the bundle ships "use client"), Vite and Remix. No Tailwind needed.

2. Add the styles and a theme

App.tsx
import "@porcelana/ui/styles.css";
import { ThemeProvider, Toaster } from "@porcelana/ui";

export function App({ children }: { children: React.ReactNode }) {
  return (
    <ThemeProvider theme="system">
      {children}
      <Toaster />
    </ThemeProvider>
  );
}

Optional fonts: the design uses Outfit and Barlow Condensed (numerals). Load them from Google Fonts or Fontsource; system fonts are the fallback.

3. Use components

Settings.tsx
import { Field, Input, Slider, Switch, Button, toast } from "@porcelana/ui";

export function Settings() {
  return (
    <form onSubmit={(e) => { e.preventDefault(); toast({ title: "Saved" }); }}>
      <Field label="Alarm label"><Input defaultValue="Morning run" /></Field>
      <Switch label="Alarm" description="Weekdays at 06:00" defaultChecked />
      <Slider label="Volume" defaultValue={[62]} showValue formatValue={(v) => `${v}%`} />
      <Button type="submit">Save</Button>
    </form>
  );
}

Every component has a page with a live example and its props. Start with Button or DataTable.

Testing your app

Components render in jsdom with Testing Library. Radix needs a few browser APIs that jsdom lacks (ResizeObserver, matchMedia, pointer capture); copy the stubs from packages/ui/src/test/setup.ts in the repo.