Black Friday: 30% off Pro

Get 30% off

Updated

Elastic Slider

Preview

Customize

Start value40
Min0
Max100
Width320px

Installation

npx shadcn@latest add https://uibrik.com/r/elastic-slider.json
Adds the files to components/uibrik/elastic-slider and installs @number-flow/react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/elastic-slider.

Usage

import { ElasticSlider } from "@/components/uibrik/elastic-slider/elastic-slider";​<ElasticSlider  label="Elastic Slider"  defaultValue={40}  min={0}  max={100}  width={320}  onChange={(value) => {}}/>

Where to use Elastic Slider

  • Volume and brightness

    A slider that stretches past its ends and springs back makes limits feel physical.

  • Consumer settings

    A rubbery feel suits playful apps where a plain range input looks out of place.

  • Media controls

    The stretch gives clear feedback when a value is already at its minimum or maximum.

    Pairs with Music Player

Props

ElasticSlider
label
Type string
"Elastic Slider"
defaultValue
Type number
40
Starting value.
min
Type number
0
Lowest value.
max
Type number
100
Highest value.
width
Type number
320
Track width.
onChange
Type (value: number) => void
–
Called as the value changes.