Skip to Content
zjkm-ui
Components

Bot Avatars

Bot avatars with living faces.

Props
48px
<BotAvatar />

Installation

npx shadcn@latest add https://ui.zjkm.tech/r/bot-avatars.json
import { 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

PropTypeDefaultDescription
sizenumber48Width and height in pixels.
colorstring"#6366f1"Colour of the head.
mood"idle" | "thinking" | "happy""idle"Idle glances around, thinking looks up and bobs, happy smiles.
labelstring"Assistant"Accessible name.
classNamestringClasses for the <svg>.

With reduced motion, the face stays still.

On this page