Settings layout
Settings: the sections on the side, alone or in titled groups (a row of chips on a phone, one menu past five), an optional identity header and the current section's forms, as titled cards with their own save or, flat, as hairline-divided rows (SettingsRow).
- Domain
- Navigation & shell
- Support level
- Size
- 6.2 kB gzip, budget 5.8 kB
- Who uses it
- 26 files of the live products and sites import it (Verikora: 7, Folioviv: 11, Sovkora: 8) Counted in the dated inventory of 2026-11-23.
import { SettingsLayout, SettingsSection, SettingsRow } from "@krizaka/ui/settings-layout";Web and mobile — the same component for React and React Native. Beta: its API may still change in a minor version.
Why it is here. Used by Sovkora, Verikora, Folioviv.
When to use
- Account, workspace and administration settings.
- Any long form that splits into independent groups.
When not to use
Installation
Install
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Import
import { SettingsLayout, SettingsSection, SettingsRow } from "@krizaka/ui/settings-layout";Examples
Account settings
Profile and notifications, each with its own save; the sections as chips on a phone.
Calm settings
The flat variant: one column of at most 45rem, each setting a row (label and help left, control right) divided by hairlines.
A private space
Who you are on top, eight sections in three groups with counts; one menu on a phone.
One section per page
A workspace's settings, the current section marked.
Props
SettingsLayout
A settings screen: sections on the left (chips on a phone, one menu past five), forms on the right.
| Prop | Type | Default | Description |
|---|---|---|---|
navrequired | readonly SettingsNavItem[] | readonly SettingsNavGroup[] | — | The sections, alone or in titled groups. |
navLabelrequired | string | — | The navigation's accessible name (Settings sections). |
description | ReactNode | — | One sentence under it. |
header | ReactNode | — | What the screen is about, above the sections: who the account is, with their actions. Replaces title and description. |
linkAs | ElementType<any, keyof IntrinsicElements> | a | The app's link component for the sections (Next's Link); an <a> otherwise. |
title | ReactNode | — | The screen's title (Settings). |
variant | "flat" | "card" | card | card (each form a titled card) or flat (one calm column of at most 45rem, rows divided by hairlines). |
SettingsRow
One setting: its label and help on the left, its control or value on the right. Put rows in a flat SettingsSection.
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | ReactNode | — | What the setting is (Username). |
description | ReactNode | — | The help text under it, one sentence. |
htmlFor | string | — | The id of the control, so the label names it (a <label htmlFor>). Leave out for a plain value. |
SettingsSection
A group of settings: a titled card with its fields and its own save, or flat rows under a title.
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | ReactNode | — | The section's title: it names the region (and is its anchor's target when id is set). |
description | ReactNode | — | What these settings change, in one sentence. |
footer | ReactNode | — | At the foot: the section's own save (a Button), a note. |
save | SectionSave | — | One save for the whole section: the section becomes a form, the foot shows the Save (enabled while dirty), the
result in a live region (saved, or the error as an alert) and an undo after a save. Replaces footer. |
variant | "flat" | "card" | card | card (a titled card) or flat (no card: a title, then hairline-divided SettingsRows). |
Accessibility
- The sections are a
navnamed bynavLabel; the current one hasaria-current(page or location). - Each section is a
sectionnamed by itsh2.
Best practices
- Past five sections, group them (
navasSettingsNavGroup[]): the sidebar shows the group titles and a phone gets one menu, never a scrolling strip of chips. - Prefer
variant="flat"andSettingsRowfor a product's settings: a label and its help on the left, the control on the right, no card. - Keep support-only facts (an account id) in a last
Advancedsection, small and mono, never in the first screen. - One save per section, at its foot: a change never waits for another.
- Sections as pages (
/settings/billing) or as anchors of one long page (#billing). - Say in the description what the section changes for the user.
Related components
Generated from the code of @krizaka/ui 5.3.4: its meta.ts, its examples and its types.Edit this documentation on GitHub