Compose the dial, the label, and the value. 0° is at the top, and the angle grows clockwise.
angle-dial.tsx
AngleDial
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | — | The angle in degrees, controlled. |
| default | number | — | The first angle, uncontrolled. Default 0. |
| on | — | Each new angle: a press, each step of a drag, a key, a typed value. | |
| on | — | 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. |
| step | number | 1 | The step of a drag and of the arrow keys, in degrees. Use a step that divides 360. Default 1. |
| snap | number | ANGLE_DIAL.snapStep | The 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. |
| disabled | boolean | false | |
| read | boolean | false | The value shows and can be focused, read, and submitted, but not changed. |
| name | string | — | The form name of the hidden range input. |
| form | string | — | The form of the hidden range input, for a dial outside its form. |
| locale | string | — | The locale of the number format. |
| format | NumberFormatOptions | — | The format of the shown value. Default: the narrow degree unit with the digits of the step. |
| get | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
AngleDialTicks
<svg>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <svg> attributes | — | Every other attribute goes to the <svg>, with a ref. |
AngleDialNeedle
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
AngleDialLabel
<label>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <label> attributes | — | Every other attribute goes to the <label>, with a ref. |
AngleDialValue
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
| Right ArroworUp Arrow | Turns the angle 1 step clockwise. |
|---|---|
| Left ArroworDown Arrow | Turns the angle 1 step back. |
| Shiftarrow keys | Turns the angle to the next snap step (15° by default). |
| Page UporPage Down | Turns the angle 45°. |
| HomeorEnd | Sets the first or the last angle of the range. |
| Enter | Opens the value field to type an angle. |
| Escape | Stops a drag or the typing and keeps the angle from before. |





