Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Slider

Adjust a price filter with visible numeric feedback.

Preview

Live preview

Changes apply to this preview only.

Drag to set the budget ceiling.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Sizes

The size drives the track height, the thumb and the gap.

Open preview

Variants

The variant sets the tone of the filled part of the track.

Open preview

States

Disabled, invalid, with or without a readout.

Open preview

Usage

Keep bounds and step meaningful for the task; do not force fine precision through pointer dragging alone.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluSliderProps

Type source
PimoluSliderProps public API
NameTypeDefaultDescription
size"sm" | "md" | "lg" | undefined"md"Visual size of the track and thumb.
variant"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined"primary"Tone of the filled part of the track.
labelstring | undefined—Visible label.
helperTextstring | undefined—Supporting text below the field.
errorMessagestring | undefined—Error text, replacing helper text.
invalidboolean | undefinedfalseExplicit invalid state.
minnumber | undefined0Lower bound.
maxnumber | undefined100Upper bound.
stepnumber | undefined1Increment between two reachable values.
valuenumber | undefined—Controlled value.
defaultValuenumber | undefined—Initial uncontrolled value.
onValueChange((value: number) => void) | undefined—Called with the new numeric value.
showValueboolean | undefinedfalseDisplay the current value next to the label.
formatValue((value: number) => string) | undefined—Formats the displayed value, for example (value) => `${value}%`.
containerClassNamestring | undefined—Class applied to the outer container.
containerStyleCSSProperties | undefined—Style applied to the outer container.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLInputElement> | undefined—Standard React/HTML attribute.
disabledboolean | undefinedfalseStandard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
requiredboolean | undefinedfalseStandard React/HTML attribute.
size

"sm" | "md" | "lg" | undefined

Default: "md"

Visual size of the track and thumb.

variant

"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined

Default: "primary"

Tone of the filled part of the track.

label

string | undefined

No default extracted.

Visible label.

helperText

string | undefined

No default extracted.

Supporting text below the field.

errorMessage

string | undefined

No default extracted.

Error text, replacing helper text.

invalid

boolean | undefined

Default: false

Explicit invalid state.

min

number | undefined

Default: 0

Lower bound.

max

number | undefined

Default: 100

Upper bound.

step

number | undefined

Default: 1

Increment between two reachable values.

value

number | undefined

No default extracted.

Controlled value.

defaultValue

number | undefined

No default extracted.

Initial uncontrolled value.

onValueChange

((value: number) => void) | undefined

No default extracted.

Called with the new numeric value.

showValue

boolean | undefined

Default: false

Display the current value next to the label.

formatValue

((value: number) => string) | undefined

No default extracted.

Formats the displayed value, for example (value) => `${value}%`.

containerClassName

string | undefined

No default extracted.

Class applied to the outer container.

containerStyle

CSSProperties | undefined

No default extracted.

Style applied to the outer container.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLInputElement> | undefined

No default extracted.

Standard React/HTML attribute.

disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

required

boolean | undefined

Default: false

Standard React/HTML attribute.

Accessibility

  • Verify arrow keys and Home/End, and offer a typed alternative for exact amounts when needed.
Read the accessibility guide →