Design Editors
Design editors define the styling options merchants can adjust in the Instant Site Editor. Each editor maps to a specific design widget — color pickers, font selectors, background controls, and more.
Overview
All design editors are created using factory functions from @lightspeed/crane-api:
import { design } from '@lightspeed/crane-api';TEXT
design.text()
Text styling (font, size, color, bold, italic, visibility)
BUTTON
design.button()
Button appearance, size, shape, color, font
IMAGE
design.image()
Image overlay (color, gradient, or none)
TOGGLE
design.toggle()
Boolean design toggle
SELECTBOX
design.selectbox()
Design dropdown selection
BACKGROUND
design.background()
Background color or gradient
COLOR_PICKER
design.colorPicker()
Standalone color selection
LOGO
design.logo()
Logo styling (font, spacing, frame, capitalization)
DIVIDER
design.divider()
Visual separator in the editor
INFO
design.info()
Informational text in the editor
ACCORDION
design.accordion()
Collapsible group of design editors
Color Values
Several design editors accept color values. Colors can be:
Hex colors:
'#RGB','#RRGGBB', or'#RRGGBBAA'formatGlobal colors: Reference the store's global color palette:
'global.color.title''global.color.body''global.color.button''global.color.link''global.color.background'
Color Configuration Options
Several editors support these optional properties for controlling color selection:
colors
string[]
Restricts the color picker to a specific set of colors
enableAlphaColor
boolean
Enables transparency (alpha channel) in the color picker
enableAutoColor
boolean
Enables the "auto" color option (uses global color)
Global Text Sizes
Text size defaults can be a specific integer (pixels) or a reference to a global text size:
'global.textSize.title''global.textSize.subtitle''global.textSize.body'
TEXT
Text styling for headings, paragraphs, and other text content.
Properties
label
string
Yes
Translation key for the editor label
colors
string[]
No
Restrict available colors
sizes
integer[]
No
Restrict available font sizes (each >= 1)
enableAlphaColor
boolean
No
Enable transparency in color picker
enableAutoColor
boolean
No
Enable auto color option
hideVisibleToggle
boolean
No
Hide the visibility toggle in the editor
hideSize
boolean
No
Hide the size selector in the editor
defaults
object
No
Default values
Defaults
font
string
No
Font family
size
integer | string
No
Font size in pixels, or a global text size reference
bold
boolean
No
Bold text
italic
boolean
No
Italic text
color
string
No
Hex color or global color reference
visible
boolean
No
Whether the element is visible
Factory
BUTTON
Button styling including appearance, size, shape, color, and font.
Properties
label
string
Yes
Translation key for the editor label
colors
string[]
No
Restrict available colors
enableAutoColor
boolean
No
Enable auto color option
enableAlphaColor
boolean
No
Enable transparency in color picker
hideVisibleToggle
boolean
No
Hide the visibility toggle
hideSize
boolean
No
Hide the size selector
defaults
object
No
Default values
Defaults
appearance
string
No
"SOLID", "OUTLINE", or "TEXT"
size
string
No
"SMALL", "MEDIUM", or "LARGE"
shape
string
No
"ROUND_CORNER", "RECTANGLE", or "PILL"
font
string
No
Font family
color
string
No
Hex color or global color reference
visible
boolean
No
Whether the button is visible
Factory
IMAGE
Image design controls for overlay effects.
Properties
label
string
Yes
Translation key for the editor label
static
boolean
No
Must match the content IMAGE editor's static value
colors
string[]
No
Restrict available colors (hex only)
enableAlphaColor
boolean
No
Enable transparency in color picker
hideVisibleToggle
boolean
No
Hide the visibility toggle
defaults
object
No
Default values
Defaults
overlay
string
No
"COLOR", "GRADIENT", or "NONE"
color
string | string[]
No
Overlay color(s) — see rules below
visible
boolean
No
Whether the image is visible
Overlay Color Rules
"COLOR"
color is required and must be a single color value
"GRADIENT"
color is required and must be an array of exactly 2 colors
"NONE" or not set
color must not be defined
Factory
Validation
The
staticflag must match between content and designIMAGEeditors for the same field. Mismatch produces: "Both content and design editor need to have same value for attribute static."Invalid color/overlay combinations produce specific errors. For example, providing a single color when overlay is
GRADIENTproduces: "color must be an array when overlay is GRADIENT."
TOGGLE
Boolean design toggle for enabling or disabling design features.
Properties
label
string
Yes
Translation key for the editor label
defaults
object
No
Default values
Defaults
enabled
boolean
No
Default toggle state
Factory
SELECTBOX
Dropdown selection for design options.
Properties
label
string
Yes
Translation key for the editor label
description
string
No
Translation key for description text
options
array
No
Array of selectable options
defaults
object
No
Default values
Each option:
value
string
No
Option value
label
string
No
Translation key for option label
Defaults
value
string
No
Default selected value
Factory
BACKGROUND
Background color or gradient controls.
Properties
label
string
Yes
Translation key for the editor label
colors
string[]
No
Restrict available colors
enableAlphaColor
boolean
No
Enable transparency in color picker
enableAutoColor
boolean
No
Enable auto color option
defaults
object
No
Default values
Defaults
style
string
No
"COLOR" or "GRADIENT"
color
string | string[]
No
Background color(s) — see rules below
Background Color Rules
"COLOR"
color is required and must be a single color value
"GRADIENT"
color is required and must be an array of exactly 2 colors
Factory
Validation
Invalid color/style combinations produce errors:
"color is required when style is GRADIENT"
"color must be an array when style is GRADIENT"
"color array must have exactly 2 items when style is GRADIENT"
"color must be a single value when style is COLOR"
COLOR_PICKER
Standalone color picker for custom color settings that don't fit into other editor types.
Properties
label
string
Yes
Translation key for the editor label
colors
string[]
No
Restrict available colors
enableAlphaColor
boolean
No
Enable transparency in color picker
enableAutoColor
boolean
No
Enable auto color option
defaults
object
No
Default values
Defaults
color
string
No
Hex color or global color reference
Factory
LOGO
Logo styling controls, including text formatting, spacing, frame, and capitalization. This editor is specific to logo elements.
Properties
label
string
Yes
Translation key for the editor label
colors
string[]
No
Restrict available colors
sizes
integer[]
No
Restrict available font sizes (each >= 1)
defaults
object
No
Default values
Defaults
font
string
No
Font family
size
integer | string
No
Font size in pixels, or a global text size reference
bold
boolean
No
Bold text
italic
boolean
No
Italic text
color
string
No
Hex color or global color reference
visible
boolean
No
Whether the logo is visible
spacing
integer
No
Letter spacing (1–9)
frame
object
No
Logo frame configuration
capitalization
string
No
"none", "all", or "small"
The frame object:
visible
boolean
Yes
Whether the frame is visible
width
integer
No
Frame width (1–49)
color
string
No
Hex color or global color reference
Factory
Mandatory for Headers
The LOGO design editor is mandatory for sections with type HEADER. It must be defined with the key logo. See Sections
DIVIDER
Visual separator in the design editor UI. Does not affect storefront rendering.
Properties
label
string
Yes
Translation key for the divider label
defaults
object
No
Default values (empty, type only)
Factory
INFO
Informational text displayed in the design editor UI. Like DIVIDER, this does not affect storefront rendering — it provides guidance or contextual help to merchants within the design panel.
Properties
label
string
Yes
Translation key for the info title
description
string
Yes
Translation key for the info description
button
object
No
Optional link button in the editor
The button object:
label
string
Yes
Translation key for button text
link
string
Yes
URL (must be a valid URL)
Defaults
description
string
No
Default info text (translation key)
button
object
No
Default button configuration (optional)
button.label
string
No
Default button text (translation key)
button.link
string
No
Default button URL (must be a valid URL)
Factory
ACCORDION
Groups multiple design editors into collapsible accordion sections in the Instant Site Editor. Each accordion item has a label and contains a set of nested design editors. This is purely an organizational tool for the editor UI — it does not affect storefront rendering directly. The nested editors within the accordion are what control the actual styling. This is useful for organizing complex design panels with many settings into logical, expandable categories.
Properties
items
object
Yes
Map of accordion items keyed by unique item identifier
sortable
boolean
No
If true, merchants can reorder items within this accordion group; when enabled, each item must define its own positionFieldName
Each accordion item:
label
string
Yes
Translation key for the accordion item header
positionFieldName
string
Conditional
Key of the editor within this item that stores the sort position for that item (required when the accordion's sortable property is true)
editors
object
Yes
Map of design editors within this accordion item
Within an accordion item, the editors object can contain standard design editors such as TEXT, BUTTON, IMAGE, TOGGLE, SELECTBOX, BACKGROUND, COLOR_PICKER, LOGO, and DIVIDER (for example, design.selectbox(), design.toggle(), design.divider(), design.text(), etc.), but it cannot contain another ACCORDION or an INFO editor.
Nested Editor Access Use the useAccordionElementDesign composable to access nested editor values from within your Vue component. See UI Composables for details.
Factory
Showcase Default Factories
When defining showcase configurations, the design.default.*() factories create standalone default values:
See Showcases for usage in showcase files.
Complete Example
Last updated
Was this helpful?
