# Circular Text

> Text set around a circle that turns slowly, for badges and stamps.

Source: https://www.honestui.com/docs/animated/circular-text

```tsx
"use client";

import { ArrowUpRight } from "honestui/icons";

import { CircularText } from "@/registry/default/animated/circular-text";

export function CircularTextDemo() {
  return (
    <div className="flex flex-wrap items-center justify-center gap-12">
      <a
        href="#careers"
        className="group rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-4 focus-visible:ring-offset-background"
      >
        <CircularText text="Now hiring" repeat={3} size={168} fontSize={13}>
          <span className="grid size-14 place-items-center rounded-full bg-foreground text-background transition-transform duration-300 ease-out group-hover:scale-110">
            <ArrowUpRight className="size-5" />
          </span>
        </CircularText>
      </a>

      <CircularText
        text="Open source · MIT licensed"
        separator=" · "
        size={116}
        fontSize={10}
        duration={24}
        direction="counterclockwise"
        onHover="pause"
        className="text-muted-foreground"
      >
        <span className="text-xs font-semibold tracking-tight text-foreground">v2.0</span>
      </CircularText>
    </div>
  );
}

```

## Overview [#overview]

Circular Text sets a short phrase around a circle and turns it slowly. The spacing stretches so the text closes into an even ring with no gap, and anything you pass as children sits in the middle, such as an arrow, a logo, or a version number.

Use it for one expressive badge on a marketing page: "Now hiring", "Scroll to explore", or a release stamp. Keep the phrase short. The text is hard to read while it turns, so never put information people need only in the ring.

## Installation [#installation]

<CliBlock commands="[&#x22;circular-text&#x22;]" />

## Usage [#usage]

```tsx
import { CircularText } from "@/components/animated/circular-text"

<a href="/careers">
  <CircularText text="Now hiring" repeat={3}>
    <ArrowUpRight className="size-5" />
  </CircularText>
</a>
```

`repeat` sets how many times the phrase goes around, and `separator` is placed after each repeat. Use `textClassName` for weight, case, or color, and `className` on the root for the text color through `currentColor`.

Hovering speeds the ring up by default. Set `onHover` to `"slowDown"`, `"pause"`, or `"none"` to change that.

## Accessibility [#accessibility]

Screen readers hear the phrase once, from visually hidden text; the rotating SVG is hidden from them. Inside a link or button, that text becomes its accessible name, so the phrase should describe where the link goes.

The ring only turns while it is on screen. With reduced motion it stays still, and `paused` stops it for everyone.

## API Reference [#api-reference]


  ### `text`

type: `string`

The phrase to set around the circle. Screen readers hear it once.

  ### `separator`

type: `string` · default: `&#x22; • &#x22;`

Placed after each repeat so the end of the phrase meets the start.

  ### `repeat`

type: `number` · default: `1`

How many times the phrase goes around the circle.

  ### `size`

type: `number` · default: `160`

Diameter in pixels.

  ### `fontSize`

type: `number` · default: `13`

Font size in pixels.

  ### `duration`

type: `number` · default: `18`

Seconds for one full turn.

  ### `direction`

type: `&#x22;clockwise&#x22; | &#x22;counterclockwise&#x22;` · default: `&#x22;clockwise&#x22;`

Which way the text turns.

  ### `onHover`

type: `&#x22;speedUp&#x22; | &#x22;slowDown&#x22; | &#x22;pause&#x22; | &#x22;none&#x22;` · default: `&#x22;speedUp&#x22;`

What hovering does to the rotation.

  ### `paused`

type: `boolean` · default: `false`

Stops the rotation.

  ### `children`

type: `ReactNode`

Content in the middle of the circle.

  ### `className`

type: `string`

Class for the root element.

  ### `textClassName`

type: `string`

Class for the SVG text.
