Skip to content

Angle Dial

Free

Set an angle on a round dial: press to point the needle, drag to turn it, or type the value. 0° is at the top, as in CSS.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Compose the dial, the label, and the value. 0° is at the top, and the angle grows clockwise.

angle-dial.tsx

AngleDial

<div>
PropTypeDefaultDescription
valuenumber—The angle in degrees, controlled.
defaultValuenumber—The first angle, uncontrolled. Default 0.
onValueChange—Each new angle: a press, each step of a drag, a key, a typed value.
onValueCommitted—The end of a change: a release, a key, a typed value. Not on Escape.
range"signed""wrap""wrap"wrap (default): 0 to 359. signed: −180 to 180. Both wrap at the ends.
stepnumber1The step of a drag and of the arrow keys, in degrees. Use a step that divides 360. Default 1.
snapStepnumberANGLE_DIAL.snapStepThe snap of Shift (a drag and Shift + arrow), in degrees. Default 15. Use a multiple of step: the value then snaps to the step grid, which would undo a snap between two steps.
variant"default""row""default"default: the dial beside its text. row: a 32px panel row with a 24px dial at the end.
size"default""lg""sm""default"The dial: sm 24, default 64, lg 96. In a row: the row height, 28, 32, or 36.
disabledbooleanfalse
readOnlybooleanfalseThe value shows and can be focused, read, and submitted, but not changed.
namestring—The form name of the hidden range input.
formstring—The form of the hidden range input, for a dial outside its form.
localestring—The locale of the number format.
formatNumberFormatOptions—The format of the shown value. Default: the narrow degree unit with the digits of the step.
getAriaValueText—The spoken value (aria-valuetext). Default: "135 degrees" in the locale.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

AngleDialDial

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

AngleDialTicks

<svg>
PropTypeDefaultDescription
...props<svg> attributes—Every other attribute goes to the <svg>, with a ref.

AngleDialNeedle

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

AngleDialLabel

<label>
PropTypeDefaultDescription
...props<label> attributes—Every other attribute goes to the <label>, with a ref.

AngleDialValue

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Use it when the value is a direction: 0° at the top, clockwise, as CSS rotate and linear-gradient angles.
  • Use variant="row" in a design panel, next to Scrub Slider rows in a ScrubSliderGroup.
  • Use range="signed" for a rotation from −180° to 180°.
  • Use name to send the angle with a form.
  • For a value on a line, such as a size or an opacity, use a Scrub Slider.
  • For a full gradient editor with stops and an angle, use a Gradient Picker.
Right ArroworUp ArrowTurns the angle 1 step clockwise.
Left ArroworDown ArrowTurns the angle 1 step back.
Shiftarrow keysTurns the angle to the next snap step (15° by default).
Page UporPage DownTurns the angle 45°.
HomeorEndSets the first or the last angle of the range.
EnterOpens the value field to type an angle.
EscapeStops a drag or the typing and keeps the angle from before.
Ticks
hover · the ticks get brighter on hover, focus, and drag
Knob
press · the knob grows to 125% while you drag
  1. AddedAngle Dial.
Open the release