AI CSS Animations

CSS AI Animations: Thinking, Streaming & Agent States

60 copy-paste animations for every state an AI feature moves through: thinking indicators, streaming replies, tool calls, agents waiting for approval, voice orbs, image generation progress, and the done and error states that close the loop.

Thought For Reasoning Disclosure

A collapsed Thought for 12s row whose chevron turns as the reasoning panel opens, the muted thoughts blur in beside a hairline rule, and the answer below slides down to make room.

thinking · chat · minimal

Streaming Code Block

A dark code block from a chat reply fills in line by line with syntax colors, line numbers arriving with each row and a soft highlight on the line being written. Each line is wiped in by clip-path.

streaming · card · dark

Inline Citation Pills

An answer writes itself sentence by sentence and a numbered citation pill springs in after each one. Then pill 2 lights up and its source card rises underneath, like a hovered reference.

streaming · chat · card

Agent File Edit Diff

An edit card for src/lib/auth.ts: two old lines blush red, three new ones push in green beneath them, and the +12 -3 counters tick up as the change lands. The counters are @property integers.

agent · tool-call · card

Agent Fleet Grid

A dashboard of six agents in a grid, each with a live status dot and a progress line. Running agents fill in bursts, flash green and start the next task, each on its own clock.

agent · card · dark

Agent Cursor Editing Code

A dark editor where an agent's named cursor opens a new line in auth.ts and types await limiter.consume(req.ip); with the line glowing as it is written. The text steps in by ch.

agent · streaming · dark

Agent Working an Issue

An issue row assigned to an agent as it moves Todo, In Progress, In Review, Done. The status ring fills like a pie through an animated @property, and the status and activity lines roll with each move.

agent · card · done

How to use these ai animations

Open any state, copy the HTML into your markup and the CSS into your stylesheet. Nothing else is required: no JavaScript, no icon fonts, no images. Each snippet's classes are prefixed with its own name, so a whole chat UI can use several at once.

Set --aia-color to your brand accent and --aia-size to scale the piece; everything inside is measured in em. The demo text is placeholder copy: swap in your model's real output, tool names and file paths.

Live states carry role="status" or aria-live so screen readers hear the change, and every snippet ships with a prefers-reduced-motion rule. In your app, swap states by toggling a class or data attribute when the model's stream events arrive.

Frequently asked questions

How do I make an AI thinking animation in CSS?

Animate something that reads as attention without implying progress: a shimmer sweeping across a 'Thinking' label, breathing dots, or a slowly turning sparkle. Every thinking entry above is pure HTML and CSS with a role="status" label.

How do I show streaming text from an LLM?

Append tokens to the element as they arrive and let CSS handle the feel: a blinking caret after the last word, a soft fade on each new chunk, or a gradient mask on the trailing edge. The streaming entries show each look with static demo text.

What states should an AI agent UI show?

At least thinking, working (with the tool or step it is on), waiting for the person, done and failed. Showing which tool is running and what it touched builds more trust than a generic spinner.

Do these work with React, Vue or Svelte?

Yes. They are plain HTML and CSS, so paste the markup into any component and the CSS into its stylesheet, then switch states with a class.