# Spinner
The Spinner field returns the value entered in its input box or via clicks on its arrow buttons.
Table of Contents
# Arguments
Name | Type | Default | Description |
---|---|---|---|
type | string | spinner | Value identifying the field type. |
min | string/int | 0 | Value to set the minimum spinner value. |
max | string/int | 1 | Value to set the maximum spinner value. |
step | string/int | 1 | Value to set the spinner step value. |
output_units | string | px | Sets the unit to be generated in any set output. |
Also See
# Build Config
Build a Custom Configuration →
Changes you make to this form will be reflected in the generated code.
Redux::set_field( 'OPT_NAME', 'SECTION_ID', array(
'type' => 'spinner'
) );
# Example Config
Redux::set_field(
'OPT_NAME',
'SECTION_ID',
array(
'id' => 'opt-spinner',
'type' => 'spinner',
'title' => esc_html__('JQuery UI Spinner Example 1', 'your-textdomain-here'),
'subtitle' => esc_html__('No validation can be done on this field type','your-textdomain-here'),
'desc' => esc_html__('JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here'),
'default' => '40',
'min' => '20',
'step' => '20',
'max' => '100',
'output' => array( '.content-area' => 'max-width' ),
)
);
# Example Usage
This example is based on the example usage provided above. Be sure to change $redux_demo
to the value you specified in your opt_name argument.
global $redux_demo;
echo 'Spinner value: ' . $redux_demo['opt-spinner'];