shadcn.io is not affiliated with official shadcn/ui
Framework
UI library
Radix UI does not include this primitive, so this page uses the Ark UI component. The visuals match the Ark UI version.
45°
Installation
bunx --bun shadcn@latest add https://kit.dev/r/radix/circular-slider.jsonAnatomy
CircularSlider
├── CircularSliderLabel
├── CircularSliderThumb
├── CircularSliderValue
├── CircularSliderContext
├── CircularSliderTrack
└── CircularSliderMarker
└── CircularSliderMarkerGroupUsage
import {
CircularSlider,
CircularSliderValue,
} from "@/components/ui/circular-slider";<CircularSlider aria-label="Angle" defaultValue={45}>
<CircularSliderValue suffix="°" />
</CircularSlider>Accessibility
| Key | Description |
|---|---|
ArrowLeft | Decrease the value. |
ArrowUp | Decrease the value. |
ArrowRight | Increase the value. |
ArrowDown | Increase the value. |
Home | Go to the start. |
End | Go to the end. |
Demos
Context
Controlled
Custom Markers
Disabled
Invalid
Read Only
Root Provider
Size
Step
Thickness
With Label
With Markers
With Value
API Reference
CircularSlider
div
PropType
AttributeType
CSS variableType
--anglestring--valuestringCircularSliderLabel
label
PropType
AttributeType
CircularSliderThumb
div
PropType
AttributeType
CSS variableType
--sizestringCircularSliderValue
div
PropType
prefix?ReactNodesuffix?ReactNodeAttributeType
CircularSliderMarkerGroup
div
PropType
AttributeType
CircularSliderMarker
div
PropType
AttributeType
CSS variableType
--marker-display-valuestring--marker-heightstring--marker-offsetstring--marker-valuestring--marker-widthstringCircularSliderRootProvider
div
PropType
AttributeType
CSS variableType
--anglestring--valuestring