---
title: "Editor controls"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/online-store-3-0-themes/theme-and-editor-interaction/editor-controls'
  md: 'https://developer.shopline.com/docs/online-store-3-0-themes/theme-and-editor-interaction/editor-controls.md'
---
# Editor controls

Editor controls enable merchants to visually edit online store themes within the theme editor. 

You can define the `settings` attributes for each module control in the theme schema configuration.

---


## Basic controls{#IOCQK}

### Standard control attributes{#foIUo}
The following table lists the standard control attributes. Some controls may have specialized attributes. For specific specialized attributes, see the following control descriptions.  

| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| type | The control type | Yes |
| id | The configuration item ID, used to access the configuration value | Yes |
| label | The configuration label, displayed in the theme editor | Yes |
| default | The configuration default value | No |
| info | The configuration remarks | No |



### text{#fo1JC}
This type of control outputs a single-line text input field, used to enter single-line text, such as a section's title.   
When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md#RBRfx).

<h4 id="MQLeM"></h4>
#### Specialized attributes
| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| placeholder | Placeholder text of the input field | No |


<h4 id="bmq4P"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "label": "Title",
      "default": "my section title",
      "placeholder": "please enter title"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/175203375993994/1741330112178-1cded127-9aa7-479e-a41c-d0b4d50b2ac8.png)


### textarea{#BU9mb}
This type of control outputs a multiple-line text input field, used to enter multiple-line text, such as a section's content.   
When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx).

<h4 id="N49bA"></h4>
#### Specialized attributes
| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| placeholder | Placeholder text of the input field | No |
| limit | Maximum text input length | No |


<h4 id="HBzuG"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "textarea",
      "id": "content",
      "label": "Content",
      "default": "my section content",
      "placeholder": "please enter content",
      "limit": 500
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![image-14.png](https://s2cdn.myshopline.com/slfs/op-new/177978893557446/image-14.png)


### richtext{#YmyRL}
This type of control outputs a rich text input field, used to display diverse text content such as blog posts. It supports basic text formatting, including. 

+ Bold
+ Italics
+ Hyperlinks
+ Paragraphs 

When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx).

<h4 id="mWDx3"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "richtext",
      "id": "content",
"label": "Content",
      "default": "content"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/175203389686852/1741335465716-d669b519-2125-4d06-84ce-4cd97b3f8767.png)


### range{#vTksL}
This type of control outputs a slider, used to adjust multiple numeric values, such as the section width. 

When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx).

<h4 id="Q4EYN"></h4>
#### Specialized attributes
| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| min | The minimum value | Yes |
| max | The maximum value | Yes |
| step | The step length of the slider. The value must be greater than `0`, and can be evenly divided by the difference between the maximum and minimum value.  | Yes |
| unit | The unit of the input value, displayed on the slider.  | No |


> **CAUTION**
>
> + The `default` value for this `range` control is required. 
> + The `min`, `max`, `step`, and `unit` attributes must use a numeric data type.

<h4 id="Z8G7g"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "range",
      "id": "width",
      "label": "Width",
      "default": 100,
      "min": 100,
      "max": 1000,
      "step": 10,
      "unit": "px"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727868981861/1741589272976-51df5a78-9927-4336-89c5-ad13ae939150.png)


### select{#LLYnS}
This type of control outputs a dropdown menu, used in scenarios with multiple options, such as the icon selection. 

When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx).

<h4 id="G6laQ"></h4>
#### Specialized attributes
| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| options | A list of options for the dropdown menu. Each option includes:<br/>• `label`: The option label. <br/>•  `value`: The option value.  | Yes |


<h4 id="q95sV"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "select",
      "id": "icon",
      "label": "Icon",
      "default": "none",
      "options": [
        {
          "label": "none",
          "value": "none"
        },
        {
          "label": "pay",
          "value": "pay"
        },
        {
          "label": "package",
          "value": "package"
        },
        {
          "label": "email",
          "value": "email"
        },
        {
          "label": "position",
          "value": "position"
        },
        {
          "label": "customer",
          "value": "customer"
        },
        {
          "label": "chat",
          "value": "chat"
        },
        {
          "label": "gift",
          "value": "gift"
        },
        {
          "label": "phone",
          "value": "phone"
        },
        {
          "label": "faq",
          "value": "faq"
        },
        {
          "label": "logistics",
          "value": "logistics"
        },
        {
          "label": "discount",
          "value": "discount"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727873110098/1741590417925-17e1a763-35c0-48c2-8851-26c358958f34.png)


### switch{#H2vBl}
This type of control outputs a switch, suitable for toggling functional states, such as controlling the visibility of a country selector. 

When accessing the configuration value of this control, the data is returned as a [boolean](https://developer.shopline.com/docs/sline/basics.md#ocahs).

> **CAUTION**
>
> If the `default` value is not specified, it defaults to `false`.

<h4 id="cq8qA"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "switch",
      "id": "show_country_selector",
      "label": "Show country selector",
      "default": true
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727875170128/1741591334106-cfc60e49-c141-4803-9561-c33c9c556c08.png)


### text_align{#ptyrt}
This control provides an interface element for selecting the horizontal alignment of an element, used for text alignment, such as aligning a title horizontally.

When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx). Possible returned values are as follows. You can also configure the `default` attribute using the following values. 

+ `left`
+ `center`
+ `right`

<h4 id="AJzy4"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "text_align",
      "id": "text_align",
      "label": "Text align",
      "default": "left"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727876898520/1741591794214-bd4896d9-5282-46f3-b885-181a64c46823.png)


### vertical_align{#ToLR2}
This control provides an interface element for selecting the vertical alignment, used to configure the alignment of elements along the vertical cross-axis, such as aligning section blocks.

When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx). Possible returned values are as follows. You can also configure the `default` attribute using the following values. 

+ `top`
+ `middle`
+ `bottom`

<h4 id="D4pVA"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "vertical_align",
      "id": "vertical_align",
      "label": "Vertical align",
      "default": "top"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727878654635/1741593540463-9bfe0e6f-b1ac-4155-b88f-da0311e264f4.png)


### horizontal_align{#lPLq5}
This control provides an interface element for selecting the horizontal alignment, used to align elements along the horizontal main axis, such as aligning section blocks.

When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx). Possible returned values are as follows. You can also configure the `default` attribute using the following values. 

+ `left`
+ `center`
+ `right`

<h4 id="ZeVEA"></h4>
#### Use case example
Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "horizontal_align",
      "id": "horizontal_align",
      "label": "Horizontal align",
      "default": "left"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727880697075/1741593939535-4205cf9e-7ea7-4ae4-882b-1cf105d6f882.png)


### url{#URtvz}
This control provides a URL combo box, allowing merchants to configure navigation targets when building their online store. Merchants can manually input an external URL, a relative path, or a phone number. They can also select the target page in the page selector. The following lists the supported pages: 

+ Home page
+ Collection overview page
+ Product detail page
+ Custom page
+ Policy page
+ Blog overview page
+ Blog post page
+ User account page
+ Cart page

When accessing the configuration value of this control, the data is returned in one of the following forms:   
+ **String**: A URL string entered directly by the merchant in the input box. For example,         `tel:+1123-***-7890` or `https://example.com`.   
+ **Resource object**: A structured object containing the page type and ID, returned when the merchant selects a preset page from the dropdown selector.  
+ **Empty string**: Returned if the merchant provides no input or makes no selection.

#### Use case example
Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "url",
      "id": "url",
      "label": "Url"
    },
    {
      "type": "url",
      "id": "tel",
      "label": "Tel"
    }
  ],
  "presets": [
    {
      "name": "My Section",
      "settings": {
        "tel": "tel:+86123456789"
      }
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![image5.png](https://s2cdn.myshopline.com/slfs/op-new/176594265657416/image5.png)
![image6.png](https://s2cdn.myshopline.com/slfs/op-new/176594266425012/image6.png)



### color{#O8ViG}
This type of control outputs a color picker, used to manage different element colors, such as a page background color. Merchants can input a color value into the text box or select the desired color in the color picker panel. 

When accessing the configuration value of this control, the data is returned in one of the following forms: 

+ [color](https://developer.shopline.com/docs/sline/object/color.md) object
+ An empty string if no input is provided 

<h4 id="J0pQY"></h4>
#### Use case example
Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "color",
      "id": "text_color",
      "label": "Text color",
      "default": "#ffffff"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727884824539/1741675276024-f21ea264-45ef-4f4f-b845-f5dc93ff4b2c.png)


### color_background{#e9WFS}
This type of control outputs a gradient color picker, used to manage gradient background colors of elements, such as a page background color. Merchants can select from preset gradient colors or customize the gradient color as needed. 

> **CAUTION**
>
> When the `default` attribute of this control is set to an empty string, the control is displayed without any color.

When accessing the configuration value of this control, the data is returned as a linear gradient or radial gradient in CSS code: 

+ [linear-gradient()](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient)
+ [radial-gradient()](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/radial-gradient)

<h4 id="RszMF"></h4>
#### Use case example
Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "color_background",
      "id": "color_background",
      "label": "Background color",
      "default": ""
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727886272341/1741682419018-34eef75f-5770-41da-a639-4406cc6e929e.png)


### color_scheme{#edR8X}
This type of control outputs a selector containing all available theme color schemes and displays a preview of the selected scheme. 

The theme color schemes in the selector are defined through the `color_scheme_group` setting. You can apply these color schemes to global theme configurations, sections, and blocks. 

When accessing the configuration value of this control, the data is returned in the selected [color_scheme](https://developer.shopline.com/docs/sline/object/color-scheme.md) object from the `color_scheme_group`.

<h4 id="K95XF"></h4>
#### Use case example

Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "color_scheme",
      "id": "color_scheme",
      "label": "Color scheme",
      "default": "scheme-1"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727888226379/1746523860496-ed13d199-6276-4165-9e35-9583cd069b31.png)


### color_scheme_group{#wH3Be}
This type of control outputs a color scheme, allowing merchants to modify the theme's color scheme. 

The colors defined within the color scheme can only be added in the `settings.schema.json` file.

Color controls are defined in `definition`, and supported control `type`values are limited to the following:

+ `color`
+ `color_background`

The `role` field outputs a preview of the color scheme. Each field represents a position on the following image, with the value of each field being the control's `id`, as defined in the `definition`.

![](https://s2cdn.myshopline.com/slfs/op-new/174727890165793/1747016869716-fe4bae97-b28f-4471-a6aa-d4e8119a7994.png)

Rules for defining the `role` field:

| **Role field** | **Type** | **Description** | **Required or not** |
| --- | --- | --- | --- |
| background | • string<br/>• \{<br/>        solid: string;<br/>        gradient: string;<br/>      } | Renders background color | Yes |
| text | string | Renders text color | Yes |
| primary_button | string | Renders color of the first button below the text | Yes |
| secondary_button | string | Renders color of the second button below the text | Yes |
| primary_button_border | string | Renders the border color of the first button below the text | Yes |
| secondary_button_border | string | Renders the border color of the second button below the text | Yes |


<h4 id="twcMU"></h4>
#### Use case example
Example code:

```json
{
  "type": "color_scheme_group",
  "id": "color_schemes",
  "definition": [
    {
      "type": "color_background",
      "id": "color_background",
      "label": "t:settings_schema.color.settings.color_schemes.definition_0.label",
      "default": "#F3F2E0"
    },
    {
      "type": "color",
      "id": "color_text",
      "label": "t:settings_schema.color.settings.color_schemes.definition_1.label",
      "default": "#3D3819"
    },
    {
      "type": "color",
      "id": "color_light_text",
      "label": "t:settings_schema.color.settings.color_schemes.definition_2.label",
      "default": "#726C4A"
    },
    {
      "type": "color",
      "id": "color_entry_line",
      "label": "t:settings_schema.color.settings.color_schemes.definition_3.label",
      "default": "#DDDDDD"
    },
    {
      "type": "color",
      "id": "color_button_background",
      "label": "t:settings_schema.color.settings.color_schemes.definition_4.label",
      "default": "#3D3819"
    },
    {
      "type": "color",
      "id": "color_button_text",
      "label": "t:settings_schema.color.settings.color_schemes.definition_5.label",
      "default": "#F3F2E0"
    },
    {
      "type": "color",
      "id": "color_button_secondary_background",
      "label": "t:settings_schema.color.settings.color_schemes.definition_6.label",
      "default": "#F3F2E0"
    },
    {
      "type": "color",
      "id": "color_button_secondary_text",
      "label": "t:settings_schema.color.settings.color_schemes.definition_7.label",
      "default": "#3D3819"
    },
    {
      "type": "color",
      "id": "color_button_secondary_border",
      "label": "t:settings_schema.color.settings.color_schemes.definition_8.label",
      "default": "#726C4A"
    },
    {
      "type": "color",
      "id": "color_button_text_link",
      "label": "t:settings_schema.color.settings.color_schemes.definition_9.label",
      "default": "#3D3819"
    }
  ],
  "role": {
    "text": "color_text",
    "background": {
      "solid": "color_background"
    },
    "primary_button": "color_button_background",
    "primary_button_border": "color_entry_line",
    "secondary_button": "color_button_secondary_background",
    "secondary_button_border": "color_button_secondary_border"
  }
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727892434977/1746524876242-ac9304e9-4d07-43d2-8371-8c7e344fdcc4.png)


### image{#hoZ1h}
This type of control outputs an image picker. Merchants can directly select images from the image library in the SHOPLINE Admin or upload new images. 

When accessing the configuration value of this control, the data is returned in an [image](https://developer.shopline.com/docs/sline/object/image.md) object.

<h4 id="F8y2t"></h4>
#### Use case example
Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "image",
      "id": "image",
      "label": "Image"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727902061072/1741684825256-268a0cef-c4a9-4773-900f-180d63f30fd4.png)


### font{#ptYdS}
This type of control outputs a font picker. 

Merchants can use this control to enhance the variety of font styles on their pages.

> **TIP**
>
> The `default` attribute for this control follows the format: `font:weight`.

When accessing the configuration value of this control, the data is returned in a [font](https://developer.shopline.com/docs/sline/object/font.md?_highlight=font) object. It can be used in conjunction with font-related filters such as [font_modify](https://developer.shopline.com/docs/sline/filter/font-modify.md?_highlight=font_modify) and [font_face](https://developer.shopline.com/docs/sline/filter/font-face.md?_highlight=font_face). 

<h4 id="pAQj8"></h4>
#### Use case example
Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "font",
      "id": "title_font",
      "label": "Title font",
      "default": "Brygada 1918:400"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727903482584/1741686887352-92690b2b-9300-42ed-b8f0-32c70a957d0c.png)


### article{#auBTv}
This type of control outputs a blog post picker. 

When accessing the configuration value of this control, the data is returned in an [article](https://developer.shopline.com/docs/sline/object/article.md) object. 

<h4 id="uAmso"></h4>
#### Use case example
Example code:

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "article",
      "id": "article",
      "label": "Article"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727905116449/1741748639867-59c47720-074f-46de-95c2-150866f1dc45.png)


### blog{#jyXtT}
This type of control outputs a blog collection picker. 

When accessing the configuration value of this control, the data is returned in a [blog](https://developer.shopline.com/docs/sline/object/blog.md) object. 

<h4 id="e74Cj"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "blog",
      "id": "blog",
      "label": "blog"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727906581205/1741749055419-0462f8a1-4b30-4307-bb92-5d6425ea395f.png)


### collection{#z3no3}
This type of control outputs a product collection picker. Merchants can select from available product collections in the store. For example, display the top ten products of the selected product collection on the home page. 

When accessing the configuration value of this control, the data is returned in a [collection](https://developer.shopline.com/docs/sline/object/collection.md) object. 

<h4 id="yVHG1"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "collection",
      "id": "collection",
      "label": "Collection"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727908291967/1741750252136-e8a629f9-0b56-4ecd-9e3e-7c90e3deb0a4.png)


### product{#u989x}
This type of control outputs a product picker, used to select the product for display. For example, display a product's details on the home page. 

When accessing the configuration value of this control, the data is returned in a [product](https://developer.shopline.com/docs/sline/object/product.md) object. 

<h4 id="MZsM9"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "product",
      "id": "product",
      "label": "Product"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727909449054/1741761862166-ae371371-2748-48ac-8d58-b2098f5aa2ff.png)

### product_id
This type of control outputs a product picker, used to select a specific product for display. For example, display a specific product's details on the home page.
This control is primarily designed for CSR scenarios. You can use the `product_id` to fetch and render the corresponding product details.  

When accessing the configuration value of this control, the data is returned in the actual stored value, which is the `product_id`.

#### Use case example
Example code:
```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "product_id",
      "id": "product_id",
      "label": "Product ID"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```
The corresponding output effect in the theme editor is as follows: 
![image-17.png](https://cdn.myshopline.com/sl/slfs/sl-new/178039629330340/image-17.png)


### product_list{#dv3np}
This type of control outputs a product list picker, used to select certain products as a list for display. For example, display some recommended products on the home page. 

When accessing the configuration value of this control, the data is returned in a list of [product](https://developer.shopline.com/docs/sline/object/product.md) objects. 

<h4 id="me2Cr"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "product_list",
      "id": "product_list",
      "label": "Product list"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727910651141/1741769600284-b18e063f-f964-4331-862b-aee13e9f8234.png)


### page{#Nbabt}
This type of control outputs a custom page selector, used to select a custom page for display. For example, display the information of a custom page on the home page. 

When accessing the configuration value of this control, the data is returned in a [page](https://developer.shopline.com/docs/sline/object/page.md) object. 

<h4 id="kPOhD"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "page",
      "id": "page",
      "label": "Page"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727912386263/1741771115978-6c39b044-033c-402d-ae45-b92b105ab030.png)


### menu{#3LdfA}
This type of control outputs a navigation menu selector, used to select and display certain navigation menus from those available in the store. For example, display the navigation menus in the page header of the home page. 

When accessing the configuration value of this control, the data is returned in a menu object.

<h4 id="aC55z"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "menu",
      "id": "menu",
      "label": "Menu"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727915189187/1741847728793-6de489bd-8e89-482b-8c87-7c5f7d82fa95.png)


### video{#pKucM}
This type of control outputs a video selector, used to select certain videos from the file library of the SHOPLINE Admin or upload videos. For example, display the product video on the home page. 

When accessing the configuration value of this control, the data is returned in a [video](https://developer.shopline.com/docs/sline/object/video.md) object.

<h4 id="uVeXu"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "video",
      "id": "video",
      "label": "Video"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727916757292/1741848219929-e33a91d9-c1dc-437f-b1ad-8c019d1c3ecb.png)


### external_video{#pqUH5}
This type of control outputs a URL input field.   
When accessing the configuration value of this control, the data is returned in an [external_video](https://developer.shopline.com/docs/sline/object/external-video.md) object.

<h4 id="OhhXa"></h4>
#### Specialized attributes
| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| format | The input format. The value is fixed as `video`. <br/>If you pass in this attribute, the placeholder value will be verified to ensure that the video provider is supported. Supported video providers are:<br/>• YouTube<br/>• Vimeo | No |
| placeholder | Placeholder text of the input field | No |


This control can be used to retrieve information from YouTube or Vimeo videos and is typically used in conjunction with the [external_video_tag](https://developer.shopline.com/docs/sline/tag/external-video-tag.md?_highlight=external_video_tag) tag and [external_video_url](https://developer.shopline.com/docs/sline/filter/external-video-url.md?_highlight=external_video_url) filter.

```json
{{#external_video_tag section.settings.external_video | external_video_url() /}}
```

<h4 id="ft8Mw"></h4>
#### Use case example: section title
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "external_video",
      "id": "external_video",
      "label": "External video"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727918088235/1741855100159-1683e18a-7e40-4226-8127-7fa86a3d34e3.png)



### padding{#VPrdJ}
This type of control outputs a padding. 

This control is used to store the top, bottom, left, and right padding values of container elements for both desktop and mobile platforms, serving the purpose of defining the internal spacing of the containers.

The default value structure of this control is a data model comprising two objects: one tailored for the desktop view and the other designed for the mobile view. Each object is equipped with specific numerical settings that represent the attributes for the four directions: top, bottom, left, and right.

When accessing the configuration value of this control, the data is returned in the data structure format of the `default` value.

<h4 id="T3mKB"></h4>
#### Use case example 
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "padding",
      "id": "padding",
      "label": "Padding",
      "default": {
        "pc":{
          "left":10,
          "right":10,
          "top":10,
          "bottom":10
        },
        "mobile":{
          "left":10,
          "right":10,
          "top":10,
          "bottom":10
        }
      }
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727919499736/1741856327209-2b8a0893-6902-4e9e-b8f6-107f28b31101.png)


### sline{#NBcaz}
This type of control outputs a code input box that accepts [Sline](https://developer.shopline.com/docs/sline/sline-overview.md) template language. It allows merchants to input custom content using Sline syntax, such as injecting additional information into specific sections on the home page.

When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md#RBRfx).

#### Specialized attribute
| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| limit | Maximum text input length | No |

<h4 id="v2jZ4"></h4>
#### Use case example 
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "sline",
      "id": "sline",
      "label": "Sline"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727921139461/1741858918453-bc85f54c-d8d4-44bc-ae21-4a9964b09879.png)


### html{#XH1q0}
This type of control outputs a multi-line text input box that accepts HTML. It enables merchants to enter custom content using HTML syntax, such as composing HTML within specific sections on the home page.  
When accessing the configuration value of this control, the data is returned as a [string](https://developer.shopline.com/docs/sline/basics.md?lang=en#RBRfx).

<h4 id="uukRF"></h4>
#### Specialized attributes
| **Attribute** | **Description** | **Required or not** |
| --- | --- | --- |
| placeholder | Placeholder text of the input field | No |  
| limit | Maximum text input length | No |

<h4 id="JAfHv"></h4>
#### Use case example
Example code: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "html",
      "id": "html",
      "label": "HTML"
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727922421185/1741860465955-b4af2e04-07e2-4edc-be4c-d142592cc8a7.png)


### payment_icon{#HhBp7}
This type of control outputs a list of payment icons. It can be used to select and display the payment methods supported by the store.  
When accessing the configuration value of this control, it usually needs to be used in conjunction with the [payment_icon_svg](https://developer.shopline.com/docs/sline/tag/payment-type-svg.md) tag.

```html
<div class="footer__payment-icons">
  {{#for pay_channel in block.settings.payment_icons.pay_channel_list}}
    {{#payment_type_svg pay_channel.type /}}
  {{/for}}
</div>
```

<h4 id="qJG1P"></h4>
#### `default` attributes
The default attribute value of this control is structured in JSON format, intended to display a preset list of icons in the theme editor.

| **default** **attribute name** | **default** **attribute value** | **Description** |
| --- | --- | --- |
| show | • `true`: display <br/>• `false`: not display | Whether to display the payment icon.  |
| pay_channel_list | [<br/>  \{<br/>    "type": \<Type>,<br/>    "show": \<Boolean><br/>  }<br/>] | Contains a list of payment method icons.  |


<h4 id="gD3HB"></h4>
#### Use case example
```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "payment_icon",
      "id": "payment_icon",
      "label": "Payment icon",
      "default": {
        "show": true,
        "pay_channel_list": [
          {
            "type": "visa",
            "show": true
          },
          {
            "type": "master-card",
            "show": true
          },
          {
            "type": "master-card2",
            "show": true
          },
          {
            "type": "visa-electron",
            "show": true
          }
        ]
      }
    }
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727924572598/1741860810633-50b981a3-c28e-4569-b146-dad40fc9e0ba.png)


### favicon{#WXZml}
This type of control outputs a website icon upload control. It can be used to select and display the website's icon, typically configured in `theme.schema.json`.

<h4 id="hjpIl"></h4>
#### Use case example
```json
{
  ...
  "schemas": [
    {
      "name": "website icon",
      "settings": [
        {
          "type": "favicon",
          "id": "favicon_image",
          "label": "website icon",
        }
      ]
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727925865759/1742806078945-f5d60ed4-180e-469e-a091-a8d5120c2555.png)

Set the website icon in `layout/theme.html`:

```html
<!DOCTYPE html>
<html>
  <head>
    {{#if settings.favicon_image}}
      <link rel="icon" type="image/png" href="{{settings.favicon_image}}" />
    {{/if}}
  </head>
  <body>
    ...
  </body>
</html>
```

The output is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727931253102/1742806567456-b11ae49a-f62f-46d3-a16c-c7e5c9884a13.png)


### date
This type of control is used to display or select date information, applicable to all date-related configuration scenarios.   

When accessing the configuration value of this control, the data is returned in the `MM-DD-YYYY` format.

#### Use case example

Example code:
```json
{
  "name": "countdown-date",
  "tag": "",
  "settings": [
    {
      "type": "date",
      "id": "deadline",
      "label": "Deadline"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows:
![image7.png](https://s2cdn.myshopline.com/slfs/op-new/176594301882250/image7.png)


### datetime
This type of control is used to display or select complete date and time information, applicable to configuration scenarios that require precision down to the minute. 

When accessing the configuration value of this control, the data is returned in the `MM-DD-YYYY HH:mm` format. For example, `12-25-2023 14:30` .

#### Use case example

Example code:

```json
{
  "name": "countdown-datetime",
  "tag": "",
  "settings": [
    {
      "type": "datetime",
      "id": "deadline",
      "label": "Deadline"
    }
  ]
}
```
The corresponding output effect in the theme editor is as follows:
![image8.png](https://s2cdn.myshopline.com/slfs/op-new/176594315933486/image8.png)


---


## Display control{#XlDow}
Display controls are exclusively for presenting information and are generally used to organize and group foundational controls for display purposes.


### group_header{#FSyw1}
This type of control adds a heading element and groups it with subsequent configuration settings. 

Configuration attributes for this control are as follows:

| Attribute | Description | Required or not |
| --- | --- | --- |
| type | The control type | Yes |
| label | The configuration label, displayed in the theme editor | Yes |
| info | The configuration remarks | No |


<h4 id="jpxst"></h4>
#### Use case example
Group the following configurations together: 

```json
{
  "name": "My Section",
  "settings": [
    {
      "type": "group_header",
      "label": "Desktop"
    },
    {
      "type": "range",
      "label": "desktop columns",
      "id": "desktop_columns",
      "default": 2,
      "min": 1,
      "max": 8,
      "step": 1
    },
    {
      "type": "group_header",
      "label": "Mobile"
    },
    {
      "type": "range",
      "label": "mobile columns",
      "id": "mobile_columns",
      "default": 2,
      "min": 1,
      "max": 8,
      "step": 1
    },
  ],
  "presets": [
    {
      "name": "My Section"
    }
  ]
}
```

The corresponding output effect in the theme editor is as follows: 

![](https://s2cdn.myshopline.com/slfs/op-new/174727932619788/1742805171255-053826d8-0468-44b7-8e8f-a5d9f62058d9.png)

:::tip{title="TIP"}
The `group_header` grouping logic renders settings sequentially. When the type is `group_header`, subsequent settings are grouped under it until the next `group_header` is encountered.