The "slider" control

Learn how to create controls using Kirki

Back to Controls


The documentation site is currently being rewritten. If you can't find what you're looking for please check the github issues and ask for assistance there until the documentation rewrite is complete.

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


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