bearnie

Slider

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

Installation

npx bearnie add slider
npx bearnie add slider

Usage

import { Slider } from "@/components/bearnie/slider"
<Slider defaultValue={[33]} max={100} step={1} />

Examples

Range

Multiple thumbs

Step values

Vertical

Disabled

With label

50%

Anatomy

  • Slider - The main slider container with track, range, and thumb(s)

Props

Prop Type Default Description
defaultValue number[] [0] Initial value(s). Use array with multiple values for range slider
min number 0 Minimum value
max number 100 Maximum value
step number 1 Step increment
disabled boolean false Disables the slider
orientation “horizontal” | “vertical” “horizontal” Slider orientation
name string - Form input name
class string - Additional CSS classes