The "slider" control

Learn how to create controls using Kirki

Back to Controls

Returnsstring|int|float

Can't find what you're looking for? Check the github issues or edit this page to add what's missing.

slider controls are numeric fields that allow you to set a minimum value, a maximum value and a step.

Example

Kirki::add_field( 'theme_config_id', [
	'type'        => 'slider',
	'settings'    => 'my_setting',
	'label'       => esc_html__( 'This is the label', 'kirki' ),
	'section'     => 'section_id',
	'default'     => 42,
	'choices'     => [
		'min'  => 0,
		'max'  => 100,
		'step' => 1,
	],
] );
Edit this page