Field reference
Range slider field
A visual numeric range control with an optional minimum, maximum, and step.
#Field definition
Add this array inside a block, field group, or option page fields list.
['field_key' => 'overlay', 'label' => 'Overlay', 'type' => 'range_slider', 'default_value' => 40, 'range_config' => ['min' => 0, 'max' => 100, 'step' => 5]]#Saved value
| Property | Value |
|---|---|
| Field type | range_slider |
| PHP / REST value | number |
| Empty value | "" or the configured default |
#Rendering example
Read block fields from $attributes. Post fields use voxycure_get_field(); option fields use voxycure_get_option().
$value = $attributes['overlay'] ?? '';
echo esc_html(is_array($value) ? implode(', ', $value) : (string) $value);#Common field options
| Key | Type | Purpose |
|---|---|---|
field_key | string | Required unique storage key using lowercase letters, numbers, underscores, or hyphens. |
label | string | Human-readable editor label. |
default_value | mixed | Value used before content is saved. Match the field value type. |
required | boolean | Rejects an empty option-page submission. |
conditional_logic | array | Controls editor visibility based on another field. |
location | string | default or inspector for block fields. |