22 AI UI snippets · every one runs live in the editor

AI UI Components

AI UI components are the interface pieces an AI product needs, from chat bubbles to voice indicators. Every snippet here runs live in the editor, so you can change it and copy the result, though the preview cannot use a microphone.

Try chat voice thinking prompt

AI UI components by use

All snippets22

Frequently Asked Questions

What are AI UI components?

AI UI components are the interface parts of an AI product, such as the chat window, the prompt box and the thinking, streaming and listening states. They cover what a user sees while a model reads, works and replies.

Do these AI UI snippets connect to an AI model?

No, these AI UI snippets are front-end components with simulated states. Replies, streaming, agent steps and voice levels run on timers, CSS animations or a fake server, so you swap in your own model's responses. The one exception is speech to text, which uses the browser's own speech recognition.

How do you make an AI thinking animation in CSS?

Clip a wide linear gradient to the text with background-clip: text and animate its background-position. The AI Thinking Text Animation snippet does this in pure CSS.

How do you show AI text streaming word by word?

Split the reply into words and append one at a time with setInterval, keeping a cursor after the last word. The AI Token Streaming Text Reveal snippet shows the pattern.

How do you stream a real AI response in JavaScript?

Read res.body from fetch through a TextDecoderStream and split the text on the blank line between server-sent events. The Stream AI Response with Fetch snippet shows the loop, with stop and error handling.