Slider

An input where the user selects a value from within a given range.

405060

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;

#[component]
pub fn SliderAnatomy() -> impl IntoView {
    view! { <Slider /> }
}

API Reference

Slider

A simple component containing all parts of a slider.

Custom Attributes
NameTypeDefaultDescription
defaultf640.0

Sets the default value of the element. Setting `value` sets this once at page load. Use this for subsequent updates.

maxf64100.0

The greatest value in the range of permitted values.

minf640.0

The lowest value in the range of permitted values.

stepf641.0

Define the granularity of the expected input value.

valueReactive<f64>0.0

A reactive signal coupled to the input's value.

Implements global and range attributes.