Skip to main content
  1. Docs
  2. Patterns
  3. 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.

ComponentHere
Page headerThe title and one line
CardA section each; the danger zone in danger
Text fieldThe profile, saved by its card's button
SwitchSettings that apply at once, with no save
ButtonSave, and the destructive one

03 — The code

Its skeleton.

settings.tsx
<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.