# Settings edit row

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

A row that shows its value and edits it in place: Edit turns it into a field with Save and Cancel; Enter saves, Escape cancels.

## Preview

settings-edit-row.tsx

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

export default function Example() {
  return (
    <Theme theme="brand">
      <SettingsEditRow label="Business name" value="Lindqvist Bakery" onSave={async (v) => v.trim().length > 0} />
    </Theme>
  );
}
```

## Import

- **CLI**

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

  ```
  import { SettingsEditRow } 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.
- **value**: The saved value.
- **placeholder**: Shown when the value is empty.
- **onSave**: Saves; answers whether it did.
- **editLabel**: Button words, for another language.
- **saveLabel**: Button words, for another language.
- **cancelLabel**: Button words, for another language.
- **className**: Extra classes, merged after the component's own.

[Previous](/components/settings-row)

[Next](/components/settings-switch-row)
