Skip to content

Introduction

Custom React components that each site restyles by setting CSS tokens.

Using a component

Everything is imported from one place. There is no third-party component library underneath.

import { Button, Field, Input } from '@/design-system';

<Field label="Email" error={error}>
  <Input type="email" name="email" />
</Field>
<Button type="submit">Send</Button>

How it is put together

  • Components are in src/design-system/.
  • Their styles are in components.css, which src/app/globals.css imports. They use Tailwind’s components layer, so a utility class you add wins.
  • A theme is a CSS class that sets tokens. The components do not change between sites.
  • Layout inside examples uses Tailwind classes, which come with the app, not with the design system.

Components