Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Blocks / Settings

Profile settings

A Linear-style profile page: member card with a tinted cover, labelled setting rows, a danger zone, and a sticky save bar that tracks unsaved changes.

bunx --bun @getweini/cli@latest add alert alert-dialog avatar badge button card input input-group select textarea
Customize
  • The settings shell (workspace header, grouped section nav with `aria-current`, and the back link) is identical across the four settings blocks, so the pages read as one product. Its labels live in `copy.nav`; it becomes a scrolling row of sections below 1024px.
  • The block is controlled. Pass the saved values in `profile`, set `loading` while your request runs, `saved` after it succeeds, and `error` with a message when it fails. It emits `save` with the edited values and `cancel` after resetting the form.
  • Save stays disabled until a value differs from `profile`. Discard restores the saved values, and a changed `profile` prop replaces the form so the saved state is the new baseline.
  • Each row puts the label and helper text at the start and the control at the end; on phones they stack. Role and locale choices come from the `roles` and `locales` props, and every visible string lives in `copy`.
  • Photo upload is yours to wire: `change-photo` and `remove-photo` are emitted, and the avatar shows `profile.photo` when it is set, otherwise initials from the name. `delete-account` is emitted only after the alert dialog is confirmed.
  • Fields validate after blur or a failed save, link their message with `aria-describedby`, and focus moves to the first invalid field.