Slider

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

Vertical

Use the orientation prop to change between horizontal and vertical orientations.

Controlled

0.3

Disabled

Use the disabled prop to disable the slider.

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;

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

API Reference

Slider

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

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.

orientationString"horizontal"

Set the orientation to render the slider. Accepted values: "vertical", "horizontal".

stepf641.0

Define the granularity of the expected input value.

valuef640.0

A reactive signal coupled to the input's value.

Implements global and range attributes.