CircularSlider API
Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.
CircularSlider19 props2 callbacks0 methods
Preset and CSS
Set preset.className to attach your CSS class to the component's rendered surface. Explicit component props take precedence over preset options.
CSS parts in the example [data-part="control"] [data-part="fill"] [data-part="label"] [data-part="marker"] [data-part="root"] [data-part="thumb"] [data-part="track"] [data-part="value"]
Use styles.root and styles.parts in a theme and generate a CSS file with themeToCss. For other JSON-friendly component props, spread presetProps(preset) before explicit props. Parts and states depend on configuration; the gallery shows those visible in the current preview.
Props19
| Name | Type | Description |
|---|---|---|
labelRequired | string | Visible and accessible slider name. |
valueOptional | number | undefined | Current angle in degrees when controlled. |
defaultValueOptional | number | undefined | Initial uncontrolled angle in degrees. |
stepOptional | number | undefined | Angle increment for pointer and keyboard interaction. |
formatValueOptional |
| Accessible and visible value formatter. Defaults to an angle with a degree symbol. |
showValueOptional | boolean | undefined | Set to false to hide the value in the center of the dial. |
markersOptional |
| Set to true to display ticks every 60 degrees, or pass exact angles. |
markersAtStepsOptional | boolean | undefined | When markers is true, render ticks at step intervals, capped at 120 ticks. |
sizeOptional | number | undefined | Dial diameter, in CSS pixels. |
thicknessOptional | number | undefined | Track thickness, in CSS pixels. |
disabledOptional | boolean | undefined | Prevent focus and changes. Disabled values are excluded from forms. |
readOnlyOptional | boolean | undefined | Keep the angle focusable and submittable while preventing changes. |
invalidOptional | boolean | undefined | Mark the slider as needing correction. |
ariaDescribedByOptional | string | undefined | DOM ID of help or validation text. |
nameOptional | string | undefined | Optional form field name. |
idOptional | string | undefined | Optional ID for the focusable dial. |
dirOptional | "ltr" | "rtl" | undefined | Override the inherited writing direction. |
presetOptional |
| Optional presentation preset. |
classNameOptional | string | undefined | Additional root classes. |
Events and callbacks2
| Name | Type | Description |
|---|---|---|
onValueChangeOptional |
| Reports the angle while the user adjusts it. |
onValueCommitOptional |
| Reports a completed pointer gesture or keyboard adjustment. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.