Avatar

Absent Person

A slot for a person who is not there: deleted account, anonymous and invited differ by mark, not only by colour.

  • avatar
  • placeholder
  • deleted
  • anonymous

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.

put this in the header: https://vibeui.ru/c/avatar-010?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-010" (Absent Person) 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-010.json

Registry item: https://vibeui.ru/r/avatar-010.json
Installs to: components/vibeui/avatar-010.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
A slot for a person who is not there: deleted account, anonymous and invited differ by mark, not only by colour.

An avatar for when there is no person: deleted account, anonymous, or an invitation sent. The mark and the description differ, not just the colour. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Avatar010 } from "@/components/vibeui/avatar-010"

<Avatar010 reason="invited" size="md" />

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-010-* palette — do not swap it for your theme tokens
- distinct marks for the three cases: one muted colour cannot tell them apart
- the dashed border on an invitation — a solid circle would promise the person is already here
- the aria-label: a screen reader reads "?" as a question mark
- muted but not invisible: the slot stays occupied in the list
- the silhouette drawn with pseudo-elements instead of an icon package

## 6. You may change
- reason — deleted, anonymous or invited
- label — your own screen-reader description
- size — sm, md or lg
- the colours for your muted palette

## 7. Rules
- Do not show a deleted user's name: the whole point of this avatar is that the name is gone.
- For an invitation the email next to it helps: the circle alone does not say who was invited.
- The three cases are deliberately different: do not collapse them into one "no photo".
- 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-010.json
https://vibeui.ru/r/avatar-010.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-avatar-010-*. Серверный: хуков нет. Вид переключается атрибутом data-reason: у приглашённого граница пунктирная и фон прозрачный, у анонима вместо знака силуэт из двух псевдоэлементов. Каждому виду соответствует своя подпись в aria-label, её можно заменить пропом 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 Avatar010Props = Omit<
  ComponentPropsWithoutRef<"span">,
  "children"
> & {
  label?: string
  reason?: "deleted" | "anonymous" | "invited"
  size?: "sm" | "md" | "lg"
}

// Идея компонента: место человека, которого нет. Удалённый аккаунт, аноним и
// приглашённый по ссылке отличаются не только цветом: у каждого свой знак и
// своя подпись для скринридера. Пунктирная граница у приглашённого говорит,
// что место занято, но ещё пусто — сплошной круг обещал бы живого человека.
const STYLES = `
:where([data-vibeui-block="avatar-010"]){
--vibeui-avatar-010-size:2.75rem;
--vibeui-avatar-010-bg:oklch(0.95 0.004 265);
--vibeui-avatar-010-fg:oklch(0.58 0.014 265);
--vibeui-avatar-010-border:oklch(0.86 0.008 265);
--vibeui-avatar-010-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="avatar-010"]{
display:inline-flex;align-items:center;justify-content:center;flex:none;vertical-align:middle;
width:var(--vibeui-avatar-010-size);height:var(--vibeui-avatar-010-size);
border-radius:9999px;box-sizing:border-box;
border:1px solid var(--vibeui-avatar-010-border);
background:var(--vibeui-avatar-010-bg);color:var(--vibeui-avatar-010-fg);
font-family:var(--vibeui-avatar-010-font);
font-size:calc(var(--vibeui-avatar-010-size) * 0.36);font-weight:650;line-height:1;
user-select:none;
}
[data-vibeui-block="avatar-010"][data-size="sm"]{--vibeui-avatar-010-size:2.25rem}
[data-vibeui-block="avatar-010"][data-size="lg"]{--vibeui-avatar-010-size:3.5rem}
/* Пунктир у приглашённого: место занято, но человека там ещё нет. */
[data-vibeui-block="avatar-010"][data-reason="invited"]{border-style:dashed;background:transparent}
[data-vibeui-block="avatar-010"][data-reason="deleted"]{--vibeui-avatar-010-fg:oklch(0.64 0.012 265)}
/* Силуэт анонима: голова и плечи двумя фигурами, без иконочного пакета. */
[data-vibeui-block="avatar-010"] [data-part="bust"]{
position:relative;
width:calc(var(--vibeui-avatar-010-size) * 0.46);
height:calc(var(--vibeui-avatar-010-size) * 0.46);
overflow:hidden;
}
[data-vibeui-block="avatar-010"] [data-part="bust"]::before{
content:"";position:absolute;left:50%;top:4%;
width:38%;height:38%;margin-left:-19%;
border-radius:9999px;background:currentColor;
}
[data-vibeui-block="avatar-010"] [data-part="bust"]::after{
content:"";position:absolute;left:50%;bottom:0;
width:78%;height:46%;margin-left:-39%;
border-radius:9999px 9999px 0 0;background:currentColor;
}
[data-vibeui-block="avatar-010"] [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-010"] *{animation:none!important;transition:none!important}}
`

const REASON_TEXT = {
  deleted: "Удалённый аккаунт",
  anonymous: "Аноним",
  invited: "Приглашение отправлено",
}

/**
 * Место человека, которого нет: удалённый, аноним или приглашённый.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Avatar010({
  label,
  reason = "deleted",
  size = "md",
  className,
  style,
  ...props
}: Avatar010Props) {
  const text = label ?? REASON_TEXT[reason]

  return (
    <>
      <style href="vibeui-avatar-010" precedence="medium">
        {STYLES}
      </style>
      <span
        {...props}
        data-vibeui-block="avatar-010"
        data-size={size}
        data-reason={reason}
        className={className}
        style={style as CSSProperties}
        role="img"
        aria-label={text}
      >
        {reason === "anonymous" ? (
          <span data-part="bust" aria-hidden="true" />
        ) : (
          <span aria-hidden="true">{reason === "invited" ? "+" : "?"}</span>
        )}
      </span>
    </>
  )
}