Avatar
Assistant Avatar
An assistant avatar: a squared shape and a glyph instead of initials — a machine must not be mistaken for a person in a thread.
- avatar
- ai
- assistant
- chat
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this in the header: https://vibeui.ru/c/avatar-009?lang=en
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
# Install and place "avatar-009" (Assistant Avatar) from VibeUI
## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/avatar-009.json
Registry item: https://vibeui.ru/r/avatar-009.json
Installs to: components/vibeui/avatar-009.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.
Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.
## 2. What it is
An assistant avatar: a squared shape and a glyph instead of initials — a machine must not be mistaken for a person in a thread.
An assistant avatar for chat: a squircle, a gradient, a glyph instead of initials and a three-dot typing indicator. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Avatar009 } from "@/components/vibeui/avatar-009"
<Avatar009 name="Assistant" typing size="lg" />
Read the installed file for the full prop list.
## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.
Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)
## 5. Keep exactly as installed
- the local --vibeui-avatar-009-* palette — do not swap it for your theme tokens
- the squared shape: circles belong to people in a thread, and the contrast makes the role visible
- the glyph instead of a letter — an initial reads as a name
- the typing state in words in aria-label, not only as dots
- the staggered dot animation via nth-child
- the prefers-reduced-motion rule that stops the blinking
## 6. You may change
- name — what the assistant is called
- typing — whether to show the dots
- size — sm, md or lg
- the accent through the accent prop — the gradient
## 7. Rules
- The typing dots are a showcase state: wiring them to a real stream is the caller's job.
- Shape is not the only cue worth having: a "bot" label next to the name settles it.
- The gradient assumes a light background; pick the second colour by hand on dark.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.
## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.For developers
npx shadcn@latest add https://vibeui.ru/r/avatar-009.jsonhttps://vibeui.ru/r/avatar-009.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-avatar-009-*. Серверный: хуков нет. Форма — скруглённый квадрат с радиусом от размера, фон — два наложенных градиента. Глиф собран из кольца и псевдоэлемента. Точки «печатает» мигают с задержкой по nth-child и полностью гасятся в prefers-reduced-motion. Состояние проговорено в aria-label.
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
import type { ComponentPropsWithoutRef, CSSProperties } from "react"
export type Avatar009Props = Omit<
ComponentPropsWithoutRef<"span">,
"children"
> & {
name?: string
/** Показать три точки: ассистент печатает ответ. */
typing?: boolean
size?: "sm" | "md" | "lg"
accent?: string
}
// Идея компонента: аватар ассистента, который нельзя спутать с человеком.
// Форма скруглённого квадрата, градиент вместо фотографии и глиф вместо
// инициалов: человека в переписке обозначает круг, машину — нет. Точки
// «печатает» гасятся при prefers-reduced-motion, иначе они дёргают внимание.
const STYLES = `
:where([data-vibeui-block="avatar-009"]){
--vibeui-avatar-009-size:2.75rem;
--vibeui-avatar-009-accent:oklch(0.62 0.17 285);
--vibeui-avatar-009-fg:oklch(0.99 0.005 285);
--vibeui-avatar-009-dot:oklch(0.99 0.005 285);
--vibeui-avatar-009-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="avatar-009"]{
position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;
width:var(--vibeui-avatar-009-size);height:var(--vibeui-avatar-009-size);
vertical-align:middle;
/* Скруглённый квадрат вместо круга: круг в переписке значит человека. */
border-radius:calc(var(--vibeui-avatar-009-size) * 0.32);
background:
radial-gradient(120% 120% at 25% 15%,color-mix(in oklab,var(--vibeui-avatar-009-accent) 55%,oklch(1 0 0)),transparent 60%),
linear-gradient(140deg,var(--vibeui-avatar-009-accent),oklch(0.42 0.13 265));
color:var(--vibeui-avatar-009-fg);font-family:var(--vibeui-avatar-009-font);
}
[data-vibeui-block="avatar-009"][data-size="sm"]{--vibeui-avatar-009-size:2.25rem}
[data-vibeui-block="avatar-009"][data-size="lg"]{--vibeui-avatar-009-size:3.5rem}
/* Глиф: кольцо с точкой внутри — знак машины, а не буква имени. */
[data-vibeui-block="avatar-009"] [data-part="glyph"]{
position:relative;
width:calc(var(--vibeui-avatar-009-size) * 0.38);
height:calc(var(--vibeui-avatar-009-size) * 0.38);
border:2px solid currentColor;border-radius:9999px;opacity:.92;
}
[data-vibeui-block="avatar-009"] [data-part="glyph"]::after{
content:"";position:absolute;left:50%;top:50%;
width:0.25rem;height:0.25rem;margin:-0.125rem 0 0 -0.125rem;
border-radius:9999px;background:currentColor;
}
[data-vibeui-block="avatar-009"] [data-part="typing"]{
position:absolute;right:-0.25rem;bottom:-0.25rem;
display:flex;align-items:center;gap:0.125rem;
padding:0.1875rem 0.3125rem;border-radius:9999px;
background:oklch(0.22 0.02 285);box-shadow:0 0 0 2px oklch(1 0 0 / 85%);
}
[data-vibeui-block="avatar-009"] [data-part="typing"] i{
width:0.1875rem;height:0.1875rem;border-radius:9999px;background:var(--vibeui-avatar-009-dot);
animation:vibeui-avatar-009-blink 1.1s ease-in-out infinite;
}
[data-vibeui-block="avatar-009"] [data-part="typing"] i:nth-child(2){animation-delay:.18s}
[data-vibeui-block="avatar-009"] [data-part="typing"] i:nth-child(3){animation-delay:.36s}
@keyframes vibeui-avatar-009-blink{
0%,100%{opacity:.35}
50%{opacity:1}
}
[data-vibeui-block="avatar-009"] [data-part="text"]{
position:absolute;width:1px;height:1px;overflow:hidden;
clip-path:inset(50%);white-space:nowrap;
}
@media (prefers-reduced-motion:reduce){
[data-vibeui-block="avatar-009"] *{animation:none!important;transition:none!important}
[data-vibeui-block="avatar-009"] [data-part="typing"] i{opacity:.8}
}
`
/**
* Аватар ассистента: квадратная форма и глиф вместо инициалов.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Avatar009({
name = "Ассистент",
typing = true,
size = "md",
accent,
className,
style,
...props
}: Avatar009Props) {
const palette = {
...(accent ? { "--vibeui-avatar-009-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-avatar-009" precedence="medium">
{STYLES}
</style>
<span
{...props}
data-vibeui-block="avatar-009"
data-size={size}
className={className}
style={palette}
role="img"
aria-label={typing ? `${name} печатает ответ` : name}
>
<span data-part="glyph" aria-hidden="true" />
{typing ? (
<span data-part="typing" aria-hidden="true">
<i />
<i />
<i />
</span>
) : null}
<span data-part="text">{name}</span>
</span>
</>
)
}