# Settings switch row

- **[Atoms](/components/)**

A row with a switch. The whole row toggles, and the switch is named by the label and its hint.

## Preview

settings-switch-row.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { SettingsSwitchRow } from '@/components/klarhimmel/ui/settings';

export default function Example() {
  return (
    <Theme theme="brand">
      <SettingsSwitchRow label="Customer sign-in" description="Adds a Sign in link to your live pages." defaultChecked onCheckedChange={(on) => console.log(on)} />
    </Theme>
  );
}
```

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/settings
  ```
- **Import**

  ```
  import { SettingsSwitchRow } 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

- **label**: The row's words.
- **description**: The row's words.
- **checked**: Controlled or uncontrolled state.
- **defaultChecked**: Controlled or uncontrolled state.
- **disabled**: Prevents interaction; posts with a form.
- **name**: Prevents interaction; posts with a form.
- **className**: Extra classes, merged after the component's own.
- **onCheckedChange**: Called on toggle; false or a rejection shows "Not saved".

[Previous](/components/settings-edit-row)

[Next](/components/preset-tile)
