Skip to content
Klarhimmel UI

Settings group

Notifications

What we email you about.

PlanBilled monthly.
Starter
Language
English
npx shadcn add @klarhimmel/settings
DetailsAbout, usage, props and more

A title, an optional description and one card of rows ruled by hairlines. The home of every settings screen; its rows answer its own width.

Preview

Settings group
settings-group.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { SettingsGroup, SettingsRow } from '@/components/klarhimmel/ui/settings';

export default function Example() {
  return (
    <Theme theme="brand">
      <SettingsGroup title="Notifications" description="What we email you about.">
        <SettingsRow label="Plan" description="Billed monthly.">Starter</SettingsRow>
      </SettingsGroup>
    </Theme>
  );
}

Import

Import

import { SettingsGroup, SettingsRow } from '@/components/klarhimmel/ui/settings';
Files
settings.tsx, in components/klarhimmel/ui/. With it: button, card, input, switch, theme, utils.
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
SettingsGroup.titleReactNode-The group heading; also names the section.
SettingsGroup.descriptionReactNode-One line under the heading.
SettingsGroup.classNamestring-Extra classes, merged after the component's own.
SettingsGroup.childrenReactNoderequiredThe rows.
SettingsRow.labelReactNoderequired
SettingsRow.descriptionReactNode-One line under the heading.
SettingsRow.idstring-
SettingsRow.classNamestring-Extra classes, merged after the component's own.
SettingsRow.childrenReactNode-The rows.