Carregando…
Carregando…
Carregando…Volume-style slider with an elastic squish/scale effect when dragged past its edges.
$ npx kikitocn add elastic-slider@/lib/utils@radix-ui/react-slidermotionlucide-reactimport { ElasticSlider } from "@/components/ui/cn/elastic-slider/ElasticSlider";
export function ElasticSliderExample() {
return (
<ElasticSlider />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
value | number | — | Valor atual (controlado) |
defaultValue | number | 50 | Valor inicial (não-controlado) |
onChange | (value: number) => void | — | Callback ao arrastar |
min | number | 0 | Valor mínimo |
max | number | 100 | Valor máximo |
step | number | 0.01 | Incremento por passo |
label | string | 'Value' | Rótulo acessível (aria-label) |
className | string | — | Classes CSS extras |
style | React.CSSProperties | — | Estilos inline extras |
Elastic Slider — arrasta além da borda pra esticar o trilho
50