# Preset tile

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

One theme preset as a pressable tile: its page, text and accent swatches, its name and a line on its look. Spread an item of listPresets() into it.

## Preview

preset-tile.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { PresetTile } from '@/components/klarhimmel/ui/theme-parts';

export default function Example() {
  return (
    <Theme theme="brand">
      <PresetTile name="Harbor" look="Navy ink and a teal accent, tight corners." swatches={{ canvas: '#f7f8fa', ink: '#0f1b2d', accent: '#0f766e' }} pressed onPress={(name) => console.log(name)} />
    </Theme>
  );
}
```

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/theme-parts
  ```
- **Import**

  ```
  import { PresetTile } from '@/components/klarhimmel/ui/theme-parts';
  ```

- **Files**: theme-parts.tsx, in components/klarhimmel/ui/. With it: input, 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

- **name**: The preset and a line on how it looks.
- **look**: The preset and a line on how it looks.
- **swatches**: Hex colours of its page, text and accent.
- **pressed**: The chosen preset.
- **onPress**: Called with the preset's name.
- **disabled**
- **className**: Extra classes, merged after the component's own.
- **mode**

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

[Next](/components/color-field)
