Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn Circular Slider for React and Tailwind

A progress-ring dial for selecting an angle.

45°

Installation

bunx --bun shadcn@latest add https://kit.dev/r/circular-slider.json

Anatomy

CircularSlider
├── CircularSliderLabel
├── CircularSliderThumb
├── CircularSliderValue
├── CircularSliderContext
├── CircularSliderTrack
└── CircularSliderMarker
    └── CircularSliderMarkerGroup

Usage

import {
  CircularSlider,
  CircularSliderValue,
} from "@/components/ui/circular-slider";
<CircularSlider aria-label="Angle" defaultValue={45}>
  <CircularSliderValue suffix="°" />
</CircularSlider>

Accessibility

KeyDescription
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

CircularSliderLabel

label

PropType
AttributeType

CircularSliderThumb

div

PropType
AttributeType
CSS variableType

CircularSliderValue

div

PropType
AttributeType

CircularSliderContext

div

PropType

CircularSliderMarkerGroup

div

PropType
AttributeType

CircularSliderMarker

div

PropType
AttributeType
CSS variableType

CircularSliderRootProvider

div

PropType
AttributeType
CSS variableType

useCircularSlider

CircularSliderContext