Agent skill
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.
Install this agent skill to your Project
npx add-skill https://github.com/resend/design-skills/tree/main/design-system
Metadata
Additional technical details for this skill
- author
- resend
- version
- 1.0.0
SKILL.md
Resend Design System
Use primitives from src/ui/ for all UI work. Never create custom components when a primitive exists. Check /design/components pages for live examples.
Quick Reference
All primitives use @/ui/{name} imports. Icons in @/ui/icons/icon-{name}.
Core Components
| 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 |
Sizing Scale
| 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 |
Color Conventions
- Primary action:
appearance="white"(inverted black/white, flips in dark mode) - Secondary:
appearance="gray" - Subtle/ghost:
appearance="fade"orappearance="fade-gray" - Destructive:
appearance="red"orappearance="fade-red"
Key Rules
- Use
cn()from@/lib/cnfor class merging - Use
@/absolute imports everywhere - Prefer Server Components;
'use client'only at lowest interactive leaf — extract the interactive part into a small leaf component, don't mark the whole page client - Use sentence case for all UI copy
- State via
stateprop, 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 adddisabled={} - Compound TextField:
TextField.Root > TextField.Slot? + TextField.Input + TextField.Slot?—stateandsizego onTextField.Input, not Root. Use<TextField.Error message={msg} id="x" />inside a trailing Slot for validation errors — it auto-wiresaria-describedby. Don't also passerror=on Input or setaria-describedbymanually. - Radix namespaces:
import * as Select from '@/ui/select' asChildfor links:<Button asChild><Link href="/x">Label</Link></Button>— also works on Dialog.Trigger, Tooltip.Trigger
Server vs Client
Already 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>
);
}
References
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 system
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
resend-brand
Use when creating Resend marketing materials, documents, presentations, or visual content. Triggers for Resend brand, Resend style, or Resend visual identity requests.
react-email
Use when creating HTML email templates with React components - welcome emails, password resets, notifications, order confirmations, newsletters, or transactional emails.
react-email
Use when creating HTML email templates with React components - welcome emails, password resets, notifications, order confirmations, newsletters, or transactional emails.
resend
Use when working with the Resend email API — sending transactional emails (single or batch), receiving inbound emails via webhooks, managing email templates, tracking delivery events, managing domains, contacts, broadcasts, webhooks, API keys, viewing API request logs, or setting up the Resend SDK. Always use this skill when the user mentions Resend, even for simple tasks like "send an email with Resend" — the skill contains critical gotchas (idempotency keys, webhook verification, template variable syntax) that prevent common production issues.
agent-email-inbox
Use when building any system where email content triggers actions — AI agent inboxes, automated support handlers, email-to-task pipelines, or any workflow processing untrusted inbound email. Always use this skill when the user wants to receive emails and act on them programmatically, even if they don't mention "agent" — the skill contains critical security patterns (sender allowlists, content filtering, sandboxed processing) that prevent untrusted email from controlling your system.
resend-cli
Operate the Resend platform from the terminal — send emails (including React Email .tsx templates via --react-email), manage domains, contacts, broadcasts, templates, webhooks, and API keys via the `resend` CLI. Use when the user wants to run Resend commands in the shell, scripts, or CI/CD pipelines, or send/preview React Email templates. Always load this skill before running `resend` commands — it contains the non-interactive flag contract and gotchas that prevent silent failures.
Didn't find tool you were looking for?