Components
Bot Avatars
Bot avatars with living faces.
<BotAvatar />Installation
npx shadcn@latest add https://ui.zjkm.tech/r/bot-avatars.jsonimport { BotAvatar } from "@/components/bot-avatars"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
A small bot face that blinks and glances around. Set mood to match what your assistant is doing. It's an image with an accessible name, so give it a label that says who it is.
import { BotAvatar } from "@/components/bot-avatars";
export function Message({ thinking }: { thinking: boolean }) {
return <BotAvatar label="Support bot" mood={thinking ? "thinking" : "idle"} />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | number | 48 | Width and height in pixels. |
color | string | "#6366f1" | Colour of the head. |
mood | "idle" | "thinking" | "happy" | "idle" | Idle glances around, thinking looks up and bobs, happy smiles. |
label | string | "Assistant" | Accessible name. |
className | string | Classes for the <svg>. |
With reduced motion, the face stays still.