Styling
Style the parts with data attributes, CSS variables or functions of state.
Data attributes
Every part exposes data-dragging, data-coasting and data-disabled. Use them with Tailwind variants or CSS attribute selectors.
CSS variables
Root sets three variables. --click-wheel-fraction is the value as a number from 0 to 1. --click-wheel-turns is the value's distance from min in revolutions, so 1.5 means one and a half revolutions. --click-wheel-rotation is the cumulative angle of the rotor in degrees. During a gesture they update directly from the continuous position. When it ends, progress reconciles to the accepted value, including any step rounding. Changes to bounds and gearing also update progress.
Rotor sets will-change: transform to reduce repainting during rotation. Avoid CSS transitions on rotate; restarting a transition on each pointer update can cause stuttering.
Functions of state
className and style accept a function of the part's state. The state is { value, dragging, coasting, disabled }.
The render prop
Replace a part's element or compose it with your own component. Handlers chain, class names join, other props override. Refs are composed, including callback cleanup functions. Custom components must forward the received props and ref.