-
Notifications
You must be signed in to change notification settings - Fork 2
Theme Type: Number
The number type allows you to define a css variable as a number. The control allows for you to limit the range the number can be from a minimum to maximum values along with a step value for how much the control increases/decreases per step. The value can also have a suffix, such as px
, rem
, em
, etc.
A short user-friendly title that gives the user an idea of this setting. This value is localized.
A long user-friendly description that details what this setting is used for. This value is localized.
Set type to number
to generate this control.
The default value you would like this control to use. This value can be an integer
or a float
with an included suffix.
"default": 300
"default": 0.5
"default": "300px"
"default": "0.875rem"
This field allows you to pass in optional values for customizing your settings. These settings will adjust the functionality and display of the number control. The metadata field for the number control allows setting the following values:
This property sets the minimum allowed value for the input selection. If no value is provided, it assumes the minimum value is 0
.
This property sets the maximum allowed value for the input selection. If no value is provided, it assumes the maximum value is 3 times the default value.
This property specifies the interval between legal numbers for this control.
This property displays a suffix at the end of the number. If default contains a suffix, that will be assumed. If left blank than no suffix will be used
"--sidebar-width": {
"name": "lib-themer.--sidebar-width.name",
"hint": "lib-themer.--sidebar-width.hint",
"type": "number",
"default": "300px",
"range": {
"min": 50,
"max": 600,
"step": 1
}
}