一键导入
resend-design-system
// Use when building or modifying UI in the Resend codebase. Provides component APIs, variant options, design tokens, and composition patterns for all src/ui/ primitives.
// Use when building or modifying UI in the Resend codebase. Provides component APIs, variant options, design tokens, and composition patterns for all src/ui/ primitives.
Use when needing Resend design resources. Routes to brand guidelines, visual identity, UI components, design tokens, and marketing page patterns.
Audit the Resend dashboard for design system alignment. Routes here when a user says "audit design", "design alignment", "dashboard design audit", or when triggered by the scheduled weekly routine.
Use when creating, updating, editing, or deleting marketing/public pages in the Resend codebase. Covers page structure, component reuse rules, and the distinction between public and product design systems.
Use when creating Resend marketing materials, documents, presentations, or visual content. Triggers for Resend brand, Resend style, or Resend visual identity requests.
| name | resend-design-system |
| description | Use when building or modifying UI in the Resend codebase. Provides component APIs, variant options, design tokens, and composition patterns for all src/ui/ primitives. |
| metadata | {"author":"resend","version":"1.0.0"} |
Use primitives from src/ui/ for all UI work. Never create custom components when a primitive exists. Check /design/components pages for live examples.
All primitives use @/ui/{name} imports. Icons in @/ui/icons/icon-{name}.
| Component | Import | Key Variants |
|---|---|---|
| Button | @/ui/button | appearance: white, gray, fade-gray, fade, fade-red, red. size: 1, 2 |
| TextField | @/ui/text-field/text-field | Compound: Root > Slot + Input + Slot. state/size on Input. size: 1, 2, 3 |
| Heading | @/ui/heading | size: 1-8. color: white, gray. weight: medium, semibold, bold |
| Text | @/ui/text | size: 1-9. color: white, gray, red, yellow |
| Tag | @/ui/tag | appearance: gray, green, red, yellow, blue, orange, violet, sand |
| Banner | @/ui/banner | Page/section-level messages (role="alert"). Auto icon. green=success, yellow=warning, red=error, blue=info. Use Tag for inline item labels |
| Select | @/ui/select | Namespace: Root > Trigger + Content > Item. For value selection (forms) |
| Dialog | @/ui/dialog | Namespace: Root > Trigger + Content > Title. size: 1, 2, full-screen |
| Switch | @/ui/switch | checked, onCheckedChange, disabled |
| Checkbox | @/ui/checkbox | checked (boolean | 'indeterminate'), onCheckedChange |
| IconButton | @/ui/icon-button | Same variants as Button. Always provide aria-label |
| DropdownMenu | @/ui/dropdown-menu | Namespace: Root > Trigger + Content > Item. For actions, not value selection |
| Size | Height | Text | Radius |
|---|---|---|---|
'1' | h-6 | text-xs | rounded-lg |
'2' | h-8 | text-sm | rounded-xl |
'3' | h-10 | text-sm | rounded-xl |
appearance="white" (inverted black/white, flips in dark mode)appearance="gray"appearance="fade" or appearance="fade-gray"appearance="red" or appearance="fade-red"cn() from @/lib/cn for class merging@/ absolute imports everywhere'use client' only at lowest interactive leaf — extract the interactive part into a small leaf component, don't mark the whole page clientstate prop, not booleans — state="loading", state="disabled", state="invalid", state="read-only". Each value is self-sufficient: state="loading" already prevents interaction, so don't also add disabled={}TextField.Root > TextField.Slot? + TextField.Input + TextField.Slot? — state and size go on TextField.Input, not Root. Use <TextField.Error message={msg} id="x" /> inside a trailing Slot for validation errors — it auto-wires aria-describedby. Don't also pass error= on Input or set aria-describedby manually.import * as Select from '@/ui/select'asChild for links: <Button asChild><Link href="/x">Label</Link></Button> — also works on Dialog.Trigger, Tooltip.TriggerAlready client (built-in, no extra 'use client' needed on your part): TextField, Checkbox, Dialog, Drawer, Collapsible, Calendar, BulkActions.
Server-safe: Button, Heading, Text, Tag, Banner, Card, EmptyState, Kbd, IconButton.
Correct pattern — extract only the interactive leaf:
// page.tsx — Server Component
export default function Page() {
return <Card><Heading>Title</Heading><DeleteDialog /></Card>;
}
// delete-dialog.tsx — small Client Component
'use client';
export function DeleteDialog() {
return (
<Dialog.Root>
<Dialog.Trigger asChild><Button appearance="fade-red">Delete</Button></Dialog.Trigger>
<Dialog.Content size="1"><Dialog.Title>Confirm delete</Dialog.Title></Dialog.Content>
</Dialog.Root>
);
}
Documented UI patterns live in design-system/references/patterns/. A pattern is a composition of src/ui/ primitives repeated across ≥ 3 dashboard files. When asked "what pattern applies to X?", load design-system/references/patterns/README.md first, then check src/app/(internal)/design/_common/documented-patterns.json to see what is currently documented.
The design-audit skill (see design-audit/SKILL.md) uses this directory when deciding whether a detected composition is already a documented pattern or a new candidate.
For detailed documentation, load these as needed:
design-system/references/components.md — Full component catalog with all props and usagedesign-system/references/design-tokens.md — Colors, typography, shadows, animationsdesign-system/references/patterns.md — CVA conventions, compound components, slot systemdesign-system/references/patterns/README.md — Documented UI composition patterns and scaffolding guide