Text Circle Scroll

Arrange any items around a circle and rotate the ring based on scroll progress (with spring), auto-spin, or a combination of both.

Examples

Scroll-driven

Auto-spin (no scroll)

Using custom nodes

Installation

npx shadcn-extras@latest add text-circle-scroll

Props

PropTypeDefaultDescription
items(string | ReactNode)[]Items around the ring in order.
radiusnumber110Radius in px (center → baseline).
innerGapnumber90Visual hole size (px).
startAnglenumber-90First item angle in degrees.
clockwisebooleantrueDirection of item order.
rotateOnScrollbooleantrueAttach rotation to scroll.
scrollDegreesnumber360Total degrees across viewport scrolling.
autoSpinDegPerSecnumber0Constant rotation (deg/s).
springStiffnessnumber120Spring stiffness for scroll rotation.
heightnumber | string320Outer container height.
className / ringClassName / itemClassName / textClassNamestringSlot overrides.