Settings layout
Lays out a settings page: the list of sections beside the one that is open on a wide screen, and on a phone the list as a page of its own that each section replaces, with a link back.
Examples
Back to settingsEmail
Account
Profile
Shown on your notes and shared searches.
Where filing alerts go.
Region
Notifications
Display
Tables
Dates
Devices
Signed in
Active now
This device
Last active 2 hours ago
Last active 3 weeks ago
Usage
Use it when
- An app's account, notification, privacy and display settings, more than 2 sections of them.
- An admin area of sections that each hold a form or a list of switches.
Use something else when
- A page with 1 or 2 groups of settings. Use Card instead, one per group, on one page.
- Views of one record. Use Tabs instead.
- The app's main sections. Use Nav instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/settings-layout.json https://kaanarici.com/r/cobalt/use-undoable.jsonimport { SettingsLayout, SettingsPanel, SettingsGroup, SettingsRow, type SettingsSection } from "@/components/cobalt/ui/settings-layout"import { useUndoable, pendingCommit, UNDO_WINDOW_MS } from "@/lib/cobalt/use-undoable"