BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/slider

slider

agileflow-projectquestorg/slider
FreeComponent

shadcn/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/projectquestorg/AgileFlow/main/apps/docs/public/r/styles/radix-nova/slider.json

Source

registry/radix-nova/ui/slider.tsxraw.githubusercontent.com/projectquestorg/AgileFlow/main/apps/docs/public/r/styles/radix-nova/slider.json
1"use client"
2
3import * as React from "react"
4import { Slider as SliderPrimitive } from "radix-ui"
5
6import { cn } from "@/registry/bases/radix/lib/utils"
7
8function Slider({
9 className,
10 defaultValue,
11 value,
12 min = 0,
13 max = 100,
14 ...props
15}: React.ComponentProps<typeof SliderPrimitive.Root>) {
16 const _values = React.useMemo(
17 () =>
18 Array.isArray(value)
19 ? value
20 : Array.isArray(defaultValue)
21 ? defaultValue
22 : [min, max],
23 [value, defaultValue, min, max]
24 )
25
26 return (
27 <SliderPrimitive.Root
28 data-slot="slider"
29 defaultValue={defaultValue}
30 value={value}
31 min={min}
32 max={max}
33 className={cn(
34 "data-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col",
35 className
36 )}
37 {...props}
38 >
39 <SliderPrimitive.Track
40 data-slot="slider-track"
41 className="bg-muted rounded-full data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1 bg-muted relative grow overflow-hidden data-horizontal:w-full data-vertical:h-full"
42 >
43 <SliderPrimitive.Range
44 data-slot="slider-range"
45 className="bg-primary absolute select-none data-horizontal:h-full data-vertical:w-full"
46 />
47 </SliderPrimitive.Track>
48 {Array.from({ length: _values.length }, (_, index) => (
49 <SliderPrimitive.Thumb
50 data-slot="slider-thumb"
51 key={index}
52 className="border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow] after:absolute after:-inset-2 hover:ring-[3px] focus-visible:ring-[3px] focus-visible:outline-hidden active:ring-[3px] block shrink-0 select-none disabled:pointer-events-none disabled:opacity-50"
53 />
54 ))}
55 </SliderPrimitive.Root>
56 )
57}
58
59export { Slider }

Files it writes

  • registry/radix-nova/ui/slider.tsx

Facts

Registry
shadcn/ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-02
Last confirmed
today

Go to the source

agileflow.projectquestorg.com projectquestorg/AgileFlow on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 133 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcn/uiComponentsFreeno deps
alertalertshadcn/uiComponentsFreeno deps
alert-dialogalert-dialogshadcn/uiComponentsFreeno deps
aspect-ratioaspect-ratioshadcn/uiComponentsFreeno deps
avataravatarshadcn/uiComponentsFreeno deps
badgebadgeshadcn/uiComponentsFreeno deps
breadcrumbbreadcrumbshadcn/uiComponentsFreeno deps
buttonbuttonshadcn/uiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex