# AI Text Loading

AI thinking text with a soft wave through the letters and words that swap letter by letter.

Install with `npx shadcn@latest add https://kokonutui.com/r/ai-text-loading.json`, then show me how to use it.

## Installation

AI Text Loading is a free, open-source React component in the Kokonut UI AI collection. Add it with the shadcn CLI, which copies the source into `components/kokonutui/ai-text-loading.tsx`, so the code is yours to change.

Copy Text

```
npx shadcn@latest add @kokonutui/ai-text-loading
```

Or add it by hand: install its packages, then copy the source from Copy code above into `components/kokonutui/ai-text-loading.tsx`.

Copy Text

```
npm install motion
```

## Usage

Copy Text

```
import AITextLoading from "@/components/kokonutui/ai-text-loading";

export default function Example() {
  return <AITextLoading />;
}
```

## Props

- `texts`: `string[]` Default `[ "Thinking...", "Processing...", "Analyzing..." ]`  
- `className`: `string`  
  Extra classes for the root element.  
- `interval`: `number` Default `1500`  
- `label`: `string` Default `"Loading"`  
  Stable status for screen readers; the cycling words are hidden from them.  
- `showElapsed`: `boolean` Default `false`  
  Show the seconds spent so far next to the words.

## Dependencies

| Needs | Version | Comes from |
| --- | --- | --- |
| `motion` | `^12.23.25` | npm, installed by the CLI |
| `cn` from `lib/utils.ts` |  | shadcn init |
| React | `19` | Your app |
| Tailwind CSS | `4` | Your app |

No provider, font or global CSS to set up: the file works as soon as it lands.
