animui
ComponentsBlocksDocsPackageTry the demo
Introduction
Installation
Theming
Motion
AI guide
Changelog
Metrics dashboard
KPI drilldown
Metric explorer
Revenue explorer
MRR waterfall
Cohort retention
Usage forecast
Journey flow
Choropleth explorer
Connected scatter
Market terminal
Budget variance
Small multiples
Line replay
AI chat
AI composer
Agent run
AI side panel
SidebarPro4
Page header
Command palette
Notification center
Empty states
Search resultsPro
Login and sign up5
OTP input
Multi-step formPro
Settings page
Settings command
Security settings
Billing overview
Usage billing
Cancel flow
Team members
Invite people
Team directory
Roles and permissions
API keys
Webhooks
Integrations
Environment variables
Plan comparison
Pricing calculatorPro
Usage pricingPro
Cart drawerPro
Checkout summaryPro
Invoice studio
Wallet card
Product listing
Product detail
Inbox triage
Support conversation
Support widget
Help centerNew
File upload
Media playerPro
Week calendar
Availability picker
Project board
Release readiness
Kanban boardNew
Hero section
Hero signupPro
Scroll storyPro
Spotlight gridPro
Feature bentoPro
Comparison table
Logo marquee
Studio perspectivesPro
Stats band
Changelog feed
FAQ section
Contact section
Team showcasePro
Blog grid
Site header
Site footer
CTA section
Newsletter signup
Activity terrain
Revenue globe
Customer galaxy
Semantic zoom
Layout morph
What’s new8 new
BlocksAI composer

AI composerPro

A focused assistant thread where messages lift out of the composer and replies stream in.

Live block · sample data

Product questions

Tandem assistant

You: How did the annual plan discount test do last week?
Assistant: Checked 4,212 checkouts

The 20% annual discount lifted annual plan share from 31% to 38% across 4,212 checkouts. Revenue per visitor held flat at $2.41, because more of those teams picked Starter over Team.

I would let it run through Friday before calling it.

Return to send

When to use

  • An in-product assistant or chat panel.
  • Chats with file attachments and suggested questions.
  • Replies that stream in with a thinking shimmer, a stop control, and copy buttons.

When not to use

  • Use support-conversation for chats with human agents.
  • Use command-palette for quick actions and search.
  • Use text-stream on its own when you already have a chat layout.

Installation

Install animui once, then import any component or block from its typed package entry.

animui · 250 components and blocks

React 19 and React DOM 19 are required. The package includes Free and Pro entries, styles and TypeScript declarations.

npm install https://animui.stracture.net/__local/package.tgz

Load the stylesheet once at your app root, then use the typed component import:

import 'animui/styles.css';
import { AiComposer } from 'animui/ai-composer';

Read the Code tab for the implementation files and the API reference below for required props.

Download animui 0.3.0 · Agent guide

Usage

Use this for an in-product assistant. Connect onSend to your model endpoint and stream its tokens into the reply; files and replies in the preview are simulated.

example.tsx
1import { AiComposer } from "animui/ai-composer";2 3export function Assistant() {4  return (5    <AiComposer6      onSend={({ text, files }) =>7        fetch("/api/chat", { method: "POST", body: JSON.stringify({ text, files }) })8      }9    />10  );11}
Built fromCopy buttonText streamText shimmer

API reference

AiComposer

An assistant thread with a composer, sample file attachments, suggested questions, and streamed replies with copy buttons. Replies and attachments are simulated.

PropTypeDefaultDescription
onSend(message: { text: string; files: string[] }) => void–Called with the text and attached file names each time a message is sent.

Keyboard interactions

Enter
Sends the message. Ignored during IME composition.
Shift+Enter
Inserts a new line.
Escape
Stops a reply that is streaming.

Accessibility

  • Suggested questions are a labelled group of buttons.
  • Sending, streaming, and stopping are announced through a visually hidden role="status" region.

Motion

  • Sent messages lift out of the composer into the thread, and replies stream in with a shimmer while thinking.
  • Reduced motion removes the lift and shows replies without the travel animation.

Responsive behavior

  • The panel is up to 760px wide and 660px tall; below 560px it drops to 620px, hides the keyboard hint, and widens bubbles to 86%.
  • Copy buttons on sent messages show on hover for mouse and are always visible on touch.

Performance

  • The thread is not virtualized; long histories grow the DOM, so trim or paginate old messages.
  • A ResizeObserver measures the composer so the thread keeps room for it.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Use for an in-product assistant or chat panel.
  • onSend only reports the message; the reply is simulated inside the block, so stream your model's tokens into the reply state instead.
  • Composes animui copy-button, text-stream, and text-shimmer.
/components/blocks/ai-composer/markdown

The full library index for assistants is at /llms.txt.

Related

Text shimmerComponentShow ongoing work with a calm light across the words.Support conversationProBlockA responsive message thread with useful quick replies and live feedback.Command paletteBlockA complete keyboard driven action surface with search, grouped results, and shortcuts.Copy buttonComponentCopy a value with immediate confirmation.
PreviousUsage pricingNextSidebar
animui · 84 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown