An email the agent wrote, with its recipients, waiting for the person to send it.
Concept, not a real feature. Designed from Geist's Card (6px radius, border shadow) with its footer. No reference shows an email draft. The header and actions use the Card footer surface, and recipients are pill Badges with an initial.
import{Button,EmailDraft}from"@replicas/ui";exportdefaultfunctionEmailDraftDemo(){return(<EmailDraft.Rootstyle={{width:"100%",maxWidth:560}}><EmailDraft.Header>New email</EmailDraft.Header><EmailDraft.Subject>Notes from Thursday's review</EmailDraft.Subject><EmailDraft.Fields><EmailDraft.Fieldlabel="From"><EmailDraft.Recipient>[email protected]</EmailDraft.Recipient></EmailDraft.Field><EmailDraft.Fieldlabel="To"><EmailDraft.Recipient>[email protected]</EmailDraft.Recipient><EmailDraft.Recipient>[email protected]</EmailDraft.Recipient></EmailDraft.Field></EmailDraft.Fields><EmailDraft.Body> Hi both, here are the three decisions from Thursday: we ship the new onboarding on the 18th, billing moves to the new provider next sprint, and the mobile beta stays invite-only until the crash rate is under 1%.</EmailDraft.Body><EmailDraft.Actions><Buttonsize="small">Discard</Button><Buttonvariant="primary"size="small"> Send email</Button></EmailDraft.Actions></EmailDraft.Root>);}
Prompt
Copy Prompt hands your agent everything it needs to build the Email Draft in the Geist style: the measured tokens, the CSS and the structure.
Show Prompt
# Geist Email Draft
An email the agent wrote, with its recipients, waiting for the person to send it.
Build a Email Draft in this project that looks and behaves like Geist's. Measured from the running Geist app (vercel.com/geist). Keep every value exact. Map the tokens onto the project's own theme variables instead of hard-coding them. Use the project's own component library for behaviour, or Base UI primitives if it has none.
Fidelity: Concept, not a real feature. Designed from Geist's Card (6px radius, border shadow) with its footer. No reference shows an email draft. The header and actions use the Card footer surface, and recipients are pill Badges with an initial.
## Tokens
| Token | Light | Dark |
| --- | --- | --- |
| `--ds-background-100` | `hsl(0 0% 100%)` | `hsl(0 0% 4%)` |
| `--ds-background-200` | `hsl(0 0% 98%)` | `hsl(0 0% 0%)` |
| `--ds-gray-200` | `hsl(0 0% 92%)` | `hsl(0 0% 12%)` |
| `--ds-gray-900` | `hsl(0 0% 30%)` | `hsl(0 0% 63%)` |
| `--ds-gray-1000` | `hsl(0 0% 9%)` | `hsl(0 0% 93%)` |
| `--ds-gray-alpha-400` | `#00000014` | `#ffffff24` |
| `--ds-shadow-border` | `0 0 0 1px #00000014, 0 0 0 1px var(--ds-background-200)` | `0 0 0 1px #ffffff25, 0 0 0 1px #000` |
| `--font-size-mini` | `0.8125rem` | `0.8125rem` |
| `--font-size-small` | `0.875rem` | `0.875rem` |
| `--font-size-regular` | `1rem` | `1rem` |
| `--font-weight-medium` | `500` | `500` |
| `--font-weight-semibold` | `600` | `600` |
| `--radius-control` | `6px` | `6px` |
| `--radius-rounded` | `9999px` | `9999px` |
## CSS
Scoped under `[data-style="geist"]`; dark rules sit under `[data-theme="dark"]`. The `ui-*` classes and data attributes match the structure below.
```css
[data-style="geist"] {
.ui-email-draft {
box-sizing: border-box;
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
border-radius: var(--radius-control);
background-color: var(--ds-background-100);
box-shadow: var(--ds-shadow-border);
color: var(--ds-gray-1000);
font-size: var(--font-size-small);
line-height: 20px;
}
.ui-email-draft-header {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-bottom: 1px solid var(--ds-gray-alpha-400);
background-color: var(--ds-background-200);
color: var(--ds-gray-900);
font-size: var(--font-size-mini);
font-weight: var(--font-weight-medium);
line-height: 20px;
}
.ui-email-draft-icon {
display: inline-flex;
flex-shrink: 0;
& svg {
width: 16px;
height: 16px;
}
}
.ui-email-draft-subject {
margin: 0;
padding: 16px 16px 4px;
color: var(--ds-gray-1000);
font-size: var(--font-size-regular);
font-weight: var(--font-weight-semibold);
line-height: 24px;
letter-spacing: -0.32px;
}
.ui-email-draft-fields {
display: flex;
flex-direction: column;
margin: 0;
padding: 0 16px;
}
.ui-email-draft-field {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
padding: 8px 0;
border-bottom: 1px solid var(--ds-gray-alpha-400);
}
.ui-email-draft-field-label {
flex-shrink: 0;
width: 40px;
color: var(--ds-gray-900);
font-size: var(--font-size-mini);
}
.ui-email-draft-field-value {
display: flex;
flex-wrap: wrap;
gap: 6px;
min-width: 0;
margin: 0;
}
.ui-email-draft-recipient {
box-sizing: border-box;
display: inline-flex;
align-items: center;
gap: 6px;
max-width: 100%;
height: 24px;
padding: 0 10px 0 2px;
border-radius: var(--radius-rounded);
background-color: var(--ds-background-100);
box-shadow: inset 0 0 0 1px var(--ds-gray-alpha-400);
color: var(--ds-gray-1000);
font-size: var(--font-size-mini);
line-height: 16px;
}
.ui-email-draft-avatar {
display: inline-flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: var(--radius-rounded);
background-color: var(--ds-gray-200);
color: var(--ds-gray-900);
font-size: 10px;
font-weight: var(--font-weight-semibold);
}
.ui-email-draft-address {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ui-email-draft-body {
padding: 12px 16px 16px;
color: var(--ds-gray-1000);
line-height: 22px;
white-space: pre-wrap;
}
.ui-email-draft-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
padding: 12px 16px;
border-top: 1px solid var(--ds-gray-alpha-400);
background-color: var(--ds-background-200);
}
}
```
## Structure
How Replicas assembles it on Base UI.
```tsx
import type { ComponentProps, ReactNode } from "react";
import { join } from "./utils";
const mailIcon = (
<svg viewBox="0 0 16 16" fill="none" aria-hidden>
<rect x="2" y="3.5" width="12" height="9" rx="1.5" stroke="currentColor" strokeWidth="1.25" />
<path d="M2.5 4.5L8 8.75l5.5-4.25" stroke="currentColor" strokeWidth="1.25" strokeLinejoin="round" />
</svg>
);
function Root({ className, ...props }: ComponentProps<"article">) {
return <article className={join("ui-email-draft", className)} {...props} />;
}
type HeaderProps = ComponentProps<"div"> & { icon?: ReactNode };
function Header({ className, icon = mailIcon, children, ...props }: HeaderProps) {
return (
<div className={join("ui-email-draft-header", className)} {...props}>
<span className="ui-email-draft-icon">{icon}</span>
<span className="ui-email-draft-label">{children}</span>
</div>
);
}
function Subject({ className, ...props }: ComponentProps<"p">) {
return <p className={join("ui-email-draft-subject", className)} {...props} />;
}
function Fields({ className, ...props }: ComponentProps<"dl">) {
return <dl className={join("ui-email-draft-fields", className)} {...props} />;
}
type FieldProps = Omit<ComponentProps<"div">, "children"> & { label: ReactNode; children: ReactNode };
function Field({ className, label, children, ...props }: FieldProps) {
return (
<div className={join("ui-email-draft-field", className)} {...props}>
<dt className="ui-email-draft-field-label">{label}</dt>
<dd className="ui-email-draft-field-value">{children}</dd>
</div>
);
}
type RecipientProps = ComponentProps<"span"> & { initial?: ReactNode };
function Recipient({ className, initial, children, ...props }: RecipientProps) {
return (
<span className={join("ui-email-draft-recipient", className)} {...props}>
<span className="ui-email-draft-avatar" aria-hidden>
{initial ?? (typeof children === "string" ? children.charAt(0).toUpperCase() : null)}
</span>
<span className="ui-email-draft-address">{children}</span>
</span>
);
}
function Body({ className, ...props }: ComponentProps<"div">) {
return <div className={join("ui-email-draft-body", className)} {...props} />;
}
function Actions({ className, ...props }: ComponentProps<"div">) {
return <div className={join("ui-email-draft-actions", className)} {...props} />;
}
export const EmailDraft = {
Root,
Header,
Subject,
Fields,
Field,
Recipient,
Body,
Actions,
};
```
## Example
```tsx
import { Button, EmailDraft } from "@replicas/ui";
export default function EmailDraftDemo() {
return (
<EmailDraft.Root style={{ width: "100%", maxWidth: 560 }}>
<EmailDraft.Header>New email</EmailDraft.Header>
<EmailDraft.Subject>Notes from Thursday's review</EmailDraft.Subject>
<EmailDraft.Fields>
<EmailDraft.Field label="From">
<EmailDraft.Recipient>[email protected]</EmailDraft.Recipient>
</EmailDraft.Field>
<EmailDraft.Field label="To">
<EmailDraft.Recipient>[email protected]</EmailDraft.Recipient>
<EmailDraft.Recipient>[email protected]</EmailDraft.Recipient>
</EmailDraft.Field>
</EmailDraft.Fields>
<EmailDraft.Body>
Hi both, here are the three decisions from Thursday: we ship the new onboarding on the 18th, billing moves to the
new provider next sprint, and the mobile beta stays invite-only until the crash rate is under 1%.
</EmailDraft.Body>
<EmailDraft.Actions>
<Button size="small">Discard</Button>
<Button variant="primary" size="small">
Send email
</Button>
</EmailDraft.Actions>
</EmailDraft.Root>
);
}
```
## Foundations
The rest of the Geist style, as a skill: https://replicas.raphaelsalaja.com/skills/geist/SKILL.md
Hi both, here are the three decisions from Thursday: we ship the new onboarding on the 18th, billing moves to the new provider next sprint, and the mobile beta stays invite-only until the crash rate is under 1%.