# Setting types

Every input type for theme, section and block settings, and what a template receives for it.

<!-- Generated by `bin/console app:dev:reference` from the platform code and docs/dev/_data/. Do not edit by hand. -->

A setting is declared in a schema with a `type`, an `id`, a `label` and usually a `default` - see [Settings](../themes/settings.md). The **value** column is what the template gets in `settings.<id>`, `section.settings.<id>` or `block.settings.<id>` after the platform resolves it: a `product` setting gives a [product](objects/product.md) object, never an id. An empty setting is `null`.

## Basic

| Type | Value | Description |
| --- | --- | --- |
| `text` | string | A single line of text. |
| `textarea` | string | Several lines of plain text - print with `\|nl2br`. |
| `richtext` | HTML string | Formatted text from the editor. Sanitised when saved and when read, so it is safe to print with `\|raw`. |
| `inline_richtext` | string | Short text for headings and button labels. Stored as plain text today and escaped on output, so formatting is not kept - print it without `\|raw`. |
| `html` | HTML string | Raw HTML entered by the merchant. Sanitised like `richtext` - scripts are removed. |
| `number` | number | A number; `min`, `max` and `step` are enforced when the merchant saves. |
| `range` | number | A slider - requires `min`, `max` and `step`, optional `unit` shown in the editor. Values outside the range are clamped. |
| `checkbox` | boolean | On or off. Without a `default` it starts off. |
| `select` | string | One of `options` - a list of `{ value, label }`. A value outside the list falls back to the default. |
| `url` | string | A link - an address on the store (`/contact/`) or `http(s)`, `mailto:`, `tel:`, `#`. Anything else is rejected. |

## Design

| Type | Value | Description |
| --- | --- | --- |
| `color` | string | A colour as `#rrggbb`. An invalid value falls back to the default. |
| `color_scheme` | string | One of the theme's colour schemes, as its id (for example `scheme-2`) - use it as a class. |
| `font_picker` | string | A font chosen from the theme's list, as its identifier. |

## Media

| Type | Value | Description |
| --- | --- | --- |
| `image_picker` | [`file`](objects/file.md) | An image from the store's media library. Pass the value to `\|image_url`. |
| `file_picker` | [`file`](objects/file.md) | Any file from the media library - a PDF catalogue, for example. |
| `video` | [`file`](objects/file.md) | A video from the media library, with `posterUrl`. |

## Store data

| Type | Value | Description |
| --- | --- | --- |
| `product` | [`product`](objects/product.md) | One offer of the store. |
| `product_list` | list of [`product`](objects/product.md) | Several offers in the merchant's order. Offers removed later drop out of the list. |
| `category` | [`category`](objects/category.md) | One store category. |
| `category_list` | list of [`category`](objects/category.md) | Several store categories. |
| `link_list` | [`menu`](objects/menu.md) | A store menu. The value is a menu handle or the name of a menu placement the theme declares in `theme.json` - the merchant assigns menus to placements. |
| `widget` | [`widget`](objects/widget.md) | A widget - a named, reusable instance of a section. Render it with `render_widget()`. |
| `store_reviews` | list of [`review`](objects/review.md) | The latest published reviews of the store. Always a list, also an empty one; `limit` sets how many. The merchant does not pick anything - there is no field in the editor. |

## Editor only

| Type | Value | Description |
| --- | --- | --- |
| `header` | none | A heading between settings in the editor. Needs `content`, has no value. |
| `paragraph` | none | A paragraph of help text in the editor. Needs `content`, has no value. |

