Skip to components
DEVELOPER REFERENCE

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

CircularSlider props
NameTypeDescription
labelRequiredstringVisible and accessible slider name.
valueOptionalnumber | undefinedCurrent angle in degrees when controlled.
defaultValueOptionalnumber | undefinedInitial uncontrolled angle in degrees.
stepOptionalnumber | undefinedAngle increment for pointer and keyboard interaction.
formatValueOptional
((value: number) => string) | undefinedInspect type
Accessible and visible value formatter. Defaults to an angle with a degree symbol.
showValueOptionalboolean | undefinedSet to false to hide the value in the center of the dial.
markersOptional
boolean | readonly number[] | undefinedInspect type
Set to true to display ticks every 60 degrees, or pass exact angles.
markersAtStepsOptionalboolean | undefinedWhen markers is true, render ticks at step intervals, capped at 120 ticks.
sizeOptionalnumber | undefinedDial diameter, in CSS pixels.
thicknessOptionalnumber | undefinedTrack thickness, in CSS pixels.
disabledOptionalboolean | undefinedPrevent focus and changes. Disabled values are excluded from forms.
readOnlyOptionalboolean | undefinedKeep the angle focusable and submittable while preventing changes.
invalidOptionalboolean | undefinedMark the slider as needing correction.
ariaDescribedByOptionalstring | undefinedDOM ID of help or validation text.
nameOptionalstring | undefinedOptional form field name.
idOptionalstring | undefinedOptional ID for the focusable dial.
dirOptional"ltr" | "rtl" | undefinedOverride the inherited writing direction.
presetOptional
ClassPreset | undefinedInspect type
Optional presentation preset.
classNameOptionalstring | undefinedAdditional root classes.

Events and callbacks2

CircularSlider events and callbacks
NameTypeDescription
onValueChangeOptional
((value: number) => void) | undefinedInspect type
Reports the angle while the user adjusts it.
onValueCommitOptional
((value: number) => void) | undefinedInspect type
Reports a completed pointer gesture or keyboard adjustment.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.