AgentChat
neon-ui/agent-chatFreeComponent
Full agent chat pane: streamed markdown turns, tool chips, reasoning, and a composer with a model-controls slot.
Install it
npx shadcn@latest add https://ui.neon.com/r/agent-chat.jsonSource
1"use client";23import {4 ArrowRight01Icon,5 Loading03Icon,6 SentIcon,7} from "@hugeicons/core-free-icons";8import { HugeiconsIcon } from "@hugeicons/react";9import type { ChatStatus, UIMessage } from "ai";10import { domAnimation, LazyMotion, m, useReducedMotion } from "motion/react";11import type {12 ComponentProps,13 FormEvent,14 KeyboardEvent,15 ReactNode,16} from "react";17import { useCallback, useRef, useState } from "react";18import { Streamdown } from "streamdown";1920import { EmptyState } from "@/components/empty-state/empty-state";21import { NeonMarkShimmer } from "@/components/neon-loader/neon-loader";22import { ToolCallChip } from "@/components/tool-call-chip/tool-call-chip";23import type { ToolCallState } from "@/components/tool-call-chip/tool-call-chip";24import { Button } from "@/components/ui/button";25import { Marker, MarkerContent } from "@/components/ui/marker";26import {27 MessageScroller,28 MessageScrollerButton,29 MessageScrollerContent,30 MessageScrollerItem,31 MessageScrollerProvider,32 MessageScrollerViewport,33} from "@/components/ui/message-scroller";34import { cn } from "@/lib/utils";3536/* ─────────────────────────────────────────────────────────37 * BLOCK STORYBOARD38 *39 * A full agent chat pane.40 *41 * entrance each new turn rises 8px on a quick spring42 * rhythm a reply sits tight under its prompt; turns43 * breathe with more air between exchanges44 * streaming the scroller follows while pinned, backs off45 * when the reader scrolls up, and offers a46 * jump-to-latest button47 * busy the Neon mark and status line shimmer in sync48 * "Agent is working" until tokens arrive49 * switches a user turn whose metadata carries a new50 * model/effort gets a quiet "switched to"51 * marker above it52 * composer flush foot of the pane: textarea on top,53 * model controls + send below, the top border54 * warms to primary on focus55 * ───────────────────────────────────────────────────────── */56const TURN_SPRING = {57 damping: 32,58 stiffness: 420,59 type: "spring" as const,60};6162const TURN_RISE_PX = 8;6364/** Rises new turns in; static under reduced motion. */65const TurnEntrance = ({ children }: { children: ReactNode }) => {66// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from neon-ui
All 77 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| ActivityFeedactivity-feed | neon-ui | Components | Free | 2 deps | |
| AnimatedWashanimated-wash | neon-ui | Components | Free | no deps · 2 files | |
| ApiKeyListapi-key-list | neon-ui | Components | Free | 2 deps | |
| AppCardapp-card | neon-ui | Components | Free | 2 deps | |
| AppCreatorapp-creator | neon-ui | Components | Free | 2 deps | |
| AuthFormauth-form | neon-ui | Components | Free | no deps | |
| AutoscaleChartautoscale-chart | neon-ui | Components | Free | 1 dep | |
| Badgebadge | neon-ui | Components | Free | 2 deps |
