- Docs
- Patterns
- Account settings
Account settings
A narrow page of cards: a form that saves, switches that apply at once, and a danger zone last.
- Built from
- 5 componentsPage header, Card, Text field
01 — The pattern
The page, live.
02 — Built from
The components, and their jobs here.
| Component | Here |
|---|---|
| Page header | The title and one line |
| Card | A section each; the danger zone in danger |
| Text field | The profile, saved by its card's button |
| Switch | Settings that apply at once, with no save |
| Button | Save, and the destructive one |
03 — The code
Its skeleton.
<PageHeader title="Account settings" description="Your profile and how you sign in." />
<PageContent width="narrow">
<Stack gap="xl">
<Card title="Profile" level={2} footer={<Button>Save changes</Button>}>
<TextField label="Display name" />
</Card>
<Card title="Sign-in" level={2}>
<Switch label="Ask for a passkey on new devices" />
</Card>
<Card tone="danger" title="Delete account" level={2} footer={<Button tone="danger">Delete my account</Button>}>
…
</Card>
</Stack>
</PageContent>04 — Rules
What makes it work.
- Narrow content: 800px, for reading and filling in.
- A form saves with its button; a switch applies at once. Never both in one card.
- The danger zone last, in danger, its button saying what it deletes.