Every app grows the same settings: a photo, a name, an email, a password, two-step verification, signed-in devices, and the organization's name and danger zone. The settings blocks are that flow, built once from Setting rows with small controls of one height.
They come from @once-ui-system/blocks and know nothing about auth. Each one reads and writes through an adapter the app supplies, so the same blocks work on Supabase, Better Auth or anything else.
The preview runs on createDemoAccountAdapter() and createDemoOrganizationAdapter(), which keep everything in memory. The two-step code there is 123456. An app's demo mode can use them too.
- Values at rest. Each row shows its value with an Edit button. Edit turns that row alone into a field with Save and Cancel; Enter saves and Escape puts it back. Every row saves on its own, so switching sections loses nothing.
- Sensitive changes in a dialog. Changing the email or password, setting up two-step verification and deleting the account ask for the current password first. An account with no password passes { recentSignIn: true } and the adapter checks the session's age.
- Email changes wait for the link. The row shows the new address as pending until it is confirmed, with a way to cancel.
- Two-step verification in three steps. Scan the code or copy the key, enter a code, save the backup codes.
- Only what works. A row appears only when the adapter implements it. A provider that cannot list sessions shows just "Sign out everywhere else". The last way to sign in cannot be disconnected.
- Roles. Owners and admins edit the organization; members see it read only and can leave. Deleting it asks for its address to be typed.
One rule for every row and dialog, so a button is always where the eye looks for it:
- Rows. The value or status comes first, then a quiet action (tertiary, such as Remove or Cancel change), then the row's one action (secondary, such as Edit, Change or Set up) at the trailing edge. Rows never use a primary button: a page of rows has no single main action.
- Committing. The button that commits (Save, Send link, Verify, Delete) is primary, with tone="danger" when it destroys something, and always last. Cancel is tertiary, just before it. Inline edits and dialog footers follow the same order; a dialog's step count sits at the footer's start.
- Narrow rows. When a row is too narrow for both, the controls wrap under the label and stay at the trailing edge, as core's Setting places them.
- One height. Every control in the blocks is size="s".
Only getAccount is required. Leave a method out and its row is not shown.
Uploads arrive cropped to a centred square of at most 512 px, so the app stores what it shows.
Every string goes through labels. Pass a partial object to change a few, or settingsLabelsHu for the Hungarian set. SettingsLayout passes its labels to every block inside it.
extraRows adds rows only one app has: a public bio on the profile, API keys under security, or business details on the organization.