Skip to content
Klarhimmel UI

Settings row

DomainWhere your site lives.

studio.example.com

npx shadcn add @klarhimmel/settings @klarhimmel/button
DetailsAbout, 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
settings-row.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { Button } from '@/components/klarhimmel/ui/button';
import { SettingsRow, SettingsValue } from '@/components/klarhimmel/ui/settings';

export default function Example() {
  return (
    <Theme theme="brand">
      <SettingsRow label="Domain" description="Where your site lives.">
        <SettingsValue>studio.example.com</SettingsValue>
        <Button size="sm" variant="ghost">Change</Button>
      </SettingsRow>
    </Theme>
  );
}

Import

Import

import { SettingsRow, SettingsValue } from '@/components/klarhimmel/ui/settings';
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

PropTypeDefaultDescription
SettingsRow.labelReactNoderequiredWhat the row is.
SettingsRow.descriptionReactNode-One line on what it does.
SettingsRow.idstring-The label's id, for a control's aria-labelledby.
SettingsRow.classNamestring-Extra classes, merged after the component's own.
SettingsRow.childrenReactNode-The value or control, drawn on the right.
SettingsValue.childrenReactNoderequiredThe value or control, drawn on the right.
SettingsValue.classNamestring-Extra classes, merged after the component's own.