Spinning Circular Text

Text arranged in a circle with a continuous spinning animation.

Port By Bhide Svelte •

Installation

pnpm dlx shadcn-svelte@latest add http://sveltekit-prerender/r/spinning-circular-text.json

Usage

usage.svelte

Features

  • Adjustable character spacing and font size
  • Container size scales automatically to fit the text ring
  • Announces the full text to screen readers via hidden content

Props

SpinningCircularText

Circular character layout with a continuously spinning ring.

NameTypeDefaultDescription
textstringrequiredText arranged around the circle.
charSpacingnumber1Spacing multiplier between characters.
fontSizestring'1rem'CSS font size used for each character.
spinClassClassValueundefinedClasses applied to the spinning character ring.
renderCharSnippet<[{ char: string; index: number }]>undefinedCustom renderer for each positioned character.
classClassValueundefinedAdditional classes applied to the outer container.
refHTMLDivElement | nullnullBindable reference to the outer container.