Slider

Component that lets the user pick an amount by sliding a button.

0

Import

JSX

Usage

JSX

Return value

If connected via the value prop and setValue prop, Slider returns a number containing the current value.

Variants

Description

0

Pick an applicable value

JSX

Units

EUR 0
JSX

No Label

0
JSX

Disabled

0
JSX

Connect to parent

It is possible to receive the value from Slider in the parent component by providing the value prop and setValue prop as shown below.

0
JSX

Props

PropTypeDefaultDescription
id*string-id of slider input
name*string-name of slider input
min*number0minimum value of the input
max*number100maximum value of the input
valuenumbermincurrent value of the input
setValue(number) => void-callback function that updates the current value in the parent
labelstring-Label above the range input
descriptionstring""displays a description about the input
disabledbooleanfalsedisables/enables range input
requiredbooleanfalseForces user to fill in the input
unitstring-unit of the value in the range input
widthstring15remsets the width of the input
stepstring1step size of the slider
showValuebooleantrueToggles showing the value
*: mandatory props