Settings row
DomainWhere your site lives.
studio.example.com
npx shadcn add @klarhimmel/settings @klarhimmel/buttonCopy for AIDetailsAbout, usage, props and more
A label with an optional hint on the left and a control or value on the right. On a narrow container the control drops below the label.
Preview
Settings row
Import
Import
- Files
- settings.tsx, button.tsx, in components/klarhimmel/ui/. With it: card, editing, input, switch, theme, utils. npm: radix-ui.
- Render in
- Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
SettingsRow.label | ReactNode | required | What the row is. |
SettingsRow.description | ReactNode | - | One line on what it does. |
SettingsRow.id | string | - | The label's id, for a control's aria-labelledby. |
SettingsRow.className | string | - | Extra classes, merged after the component's own. |
SettingsRow.children | ReactNode | - | The value or control, drawn on the right. |
SettingsValue.children | ReactNode | required | The value or control, drawn on the right. |
SettingsValue.className | string | - | Extra classes, merged after the component's own. |