Settings Section
Layout for grouped settings pages.
Installation
pnpm dlx shadcn@latest add @paneui/settings-sectionUsage
Composition
Examples
Rows
A row wraps its control under the text on narrow screens. Render it as a <label> (render={<label />}) so clicking anywhere toggles its switch.
Nav
Below md the settings nav becomes a horizontally scrolling strip.
Interactive rows
An interactive row is one <button> (or the element render gives): it takes the hover and press fill, an inset focus ring and a trailing chevron that flips in right-to-left layouts. Keep other controls out of it.
SettingsGroup
Also accepts every prop of div.
- tone= "default"
- "default" | "destructive"
- Destructive ring for a danger zone.
| Prop | Type | Default | Description |
|---|---|---|---|
| tone | "default" | "destructive" | "default" | Destructive ring for a danger zone. |
SettingsRow
Min 56px row with a hairline between rows. Also accepts every prop of div (useRender).
- render
- ReactElement
- Render as another element, e.g.
<label />or a router link. - interactive= false
- boolean
- The row is the control: a
<button>by default, with hover and press fill, focus ring and chevron. - detail
- ReactNode
- Muted trailing text before the chevron, such as the current value.
- chevron= true
- boolean
- Show the chevron on an interactive row.
| Prop | Type | Default | Description |
|---|---|---|---|
| render | ReactElement | — | Render as another element, e.g. <label /> or a router link. |
| interactive | boolean | false | The row is the control: a <button> by default, with hover and press fill, focus ring and chevron. |
| detail | ReactNode | — | Muted trailing text before the chevron, such as the current value. |
| chevron | boolean | true | Show the chevron on an interactive row. |
- data-interactive
- Present on an interactive row.
| Data attribute | Description |
|---|---|
| data-interactive | Present on an interactive row. |
SettingsRowLink
Interactive row that renders an <a> and takes every anchor attribute; pass render for a router link. Also accepts every prop of a.
- target
- string
_blankwithoutreladdsrel="noopener noreferrer".- external= false
- boolean
- An external-link icon instead of the chevron.
- detail
- React.ReactNode
- Same as
SettingsRow. - chevron= true
- boolean
- Same as
SettingsRow.
| Prop | Type | Default | Description |
|---|---|---|---|
| target | string | — | _blank without rel adds rel="noopener noreferrer". |
| external | boolean | false | An external-link icon instead of the chevron. |
| detail | React.ReactNode | — | Same as SettingsRow. |
| chevron | boolean | true | Same as SettingsRow. |