G
Tokens
TypographySpacingColorRadiusShadowMotion

Slider

Value


    <Slider id="valueExample" value={20} onChange={() => {}}/>
  

Label and hint


    <Slider
      id="valueExample"
      label="ISO"
      hint="Sensitivity of the sensor"
      value={2}
      onChange={() => {}}
    />
  

Examples

With state


    () => {
      const [value, setValue] = useState(8);
      
      return (
        <Stack gap="l">
          <div>{value}</div>

          <Slider
            label="Volume"
            id="stateExample"
            value={value}
            onChange={(e) => setValue(e.target.valueAsNumber)}
            min={0}
            max={100}
          />
        </Stack>
      )
    }


Props

Name
Type
Default
min
number
0
max
number
100
value
number
step
number
onChange
func
label
oneOfType
string
node
hint
oneOfType
string
node
id
string