Avatar

Verified Name

The verification mark sits after the name, not in the portrait's corner: it is the name that gets verified, and in the corner the tick gets lost among presence and role.

  • avatar
  • verified
  • badge
  • identity

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-035?lang=en

Анна РеброваЛичность подтверждена since 12 March 2025
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-035" (Verified Name) 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-035.json

Registry item: https://vibeui.ru/r/avatar-035.json
Installs to: components/vibeui/avatar-035.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
The verification mark sits after the name, not in the portrait's corner: it is the name that gets verified, and in the corner the tick gets lost among presence and role.

An avatar with a verification mark in the name line: three kinds differ by the shape of the mark and are spelled out in words. Zero dependencies, one file, no client JS.

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

<Avatar035 name="Anna Rebrova" kind="person" since="since 12 March 2025" />

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-035-* palette — do not swap it for your theme tokens
- the mark in the name line rather than the portrait corner: the name is what gets verified, and a corner mark is lost among presence and role
- kinds differing by shape — circle, square, hexagon: colour cannot separate them
- the wording in the second line: a tick is mute on its own
- aria-hidden on the mark — otherwise a screen reader announces the verification twice
- the row's own light surface: without it the dark text disappears on a dark background

## 6. You may change
- the name and the verification kind through kind
- the verification date through since
- the three kind colours in the variables
- the wording in the dictionary

## 7. Rules
- A verification mark is a promise made in your name: draw it only where a check really happened.
- Do not add a second badge in the portrait corner next to it: two marks in a row read as one compound sign.
- The date arrives as a ready string: formatting and grammar stay with the caller.
- 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-035.json
https://vibeui.ru/r/avatar-035.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-avatar-035-*. Серверный: хуков нет. Знак вынесен в строку имени, а не в угол портрета: подтверждают имя, а в углу галочка соседствует с присутствием и ролью и теряется среди них. Три вида подтверждения различаются формой знака — круг, скруглённый квадрат, шестиугольник на clip-path, — и каждый расшифрован словами во второй строке. Сама галочка нарисована двумя бордюрами псевдоэлемента, иконочный пакет ради неё не нужен.

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 Avatar035Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children"
> & {
  name?: string
  kind?: "person" | "organisation" | "creator"
  since?: string
}

// Идея компонента: знак подтверждения стоит после имени, а не в углу портрета.
// Подтверждают имя, а не фотографию: в углу аватара галочка соседствует с
// присутствием и ролью и теряется среди них, а рядом с именем она читается
// как часть подписи и переезжает вместе с ней в любую строку. Три вида
// подтверждения различаются формой знака — круг, квадрат, шестиугольник, — и
// каждый расшифрован словами во второй строке: галочка сама по себе немая.
const STYLES = `
:where([data-vibeui-block="avatar-035"]){
--vibeui-avatar-035-size:2.5rem;
--vibeui-avatar-035-tick:1rem;
--vibeui-avatar-035-bg:oklch(1 0 0);
--vibeui-avatar-035-fg:oklch(0.24 0.014 265);
--vibeui-avatar-035-muted:oklch(0.55 0.014 265);
--vibeui-avatar-035-border:oklch(0.91 0.006 265);
--vibeui-avatar-035-person:oklch(0.55 0.2 262);
--vibeui-avatar-035-org:oklch(0.55 0.13 195);
--vibeui-avatar-035-creator:oklch(0.62 0.17 320);
--vibeui-avatar-035-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
/* Своя светлая подложка: тёмный текст обязан читаться на любом фоне. */
[data-vibeui-block="avatar-035"]{
display:flex;align-items:center;gap:0.75rem;
box-sizing:border-box;width:100%;max-width:20rem;padding:0.5rem 0.75rem;
background:var(--vibeui-avatar-035-bg);
border:1px solid var(--vibeui-avatar-035-border);border-radius:0.75rem;
font-family:var(--vibeui-avatar-035-font);color:var(--vibeui-avatar-035-fg);
}
[data-vibeui-block="avatar-035"] *{box-sizing:border-box}
[data-vibeui-block="avatar-035"] [data-part="face"]{
display:grid;place-items:center;flex:none;
width:var(--vibeui-avatar-035-size);height:var(--vibeui-avatar-035-size);
border-radius:9999px;
background:oklch(0.9 0.06 var(--vibeui-avatar-035-hue,265));
color:oklch(0.36 0.12 var(--vibeui-avatar-035-hue,265));
font-size:calc(var(--vibeui-avatar-035-size) * 0.34);font-weight:700;line-height:1;
}
[data-vibeui-block="avatar-035"] [data-part="text"]{display:flex;flex-direction:column;gap:0.0625rem;min-width:0;flex:1 1 auto}
/* Знак — часть подписи: он стоит в строке имени, а не в углу портрета. */
[data-vibeui-block="avatar-035"] [data-part="name"]{
display:flex;align-items:center;gap:0.3125rem;min-width:0;
font-size:0.875rem;font-weight:650;
}
[data-vibeui-block="avatar-035"] [data-part="label"]{
min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
[data-vibeui-block="avatar-035"] [data-part="badge"]{
position:relative;display:grid;place-items:center;flex:none;
width:var(--vibeui-avatar-035-tick);height:var(--vibeui-avatar-035-tick);
border-radius:9999px;background:var(--vibeui-avatar-035-person);
}
/* Форма знака различает вид подтверждения, а не только цвет. */
[data-vibeui-block="avatar-035"][data-kind="organisation"] [data-part="badge"]{
border-radius:0.25rem;background:var(--vibeui-avatar-035-org);
}
[data-vibeui-block="avatar-035"][data-kind="creator"] [data-part="badge"]{
border-radius:0;background:var(--vibeui-avatar-035-creator);
clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
}
/* Галочка на двух бордюрах: иконочный пакет ради неё не нужен. */
[data-vibeui-block="avatar-035"] [data-part="badge"]::after{
content:"";width:0.1875rem;height:0.375rem;
border:solid oklch(1 0 0);border-width:0 0.09375rem 0.09375rem 0;
transform:translateY(-0.0625rem) rotate(45deg);
}
[data-vibeui-block="avatar-035"] [data-part="since"]{
font-size:0.75rem;color:var(--vibeui-avatar-035-muted);
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="avatar-035"] *{animation:none!important;transition:none!important}}
`

const KIND_LABEL = {
  person: "Личность подтверждена",
  organisation: "Организация подтверждена",
  creator: "Автор подтверждён",
} as const

function hue(name: string) {
  let hash = 2166136261
  for (const symbol of name) {
    hash ^= symbol.codePointAt(0)!
    hash = Math.imul(hash, 16777619)
  }
  return ((hash >>> 0) % 12) * 30
}

function initials(name: string) {
  return name
    .split(" ")
    .slice(0, 2)
    .map((part) => part.charAt(0).toUpperCase())
    .join("")
}

/**
 * Аватар со знаком подтверждения в строке имени: вид различается формой знака.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Avatar035({
  name = "Анна Реброва",
  kind = "person",
  since = "с 12 марта 2025",
  className,
  style,
  ...props
}: Avatar035Props) {
  const palette = {
    "--vibeui-avatar-035-hue": hue(name),
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-avatar-035" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="avatar-035"
        data-kind={kind}
        className={className}
        style={palette}
      >
        <span data-part="face" aria-hidden="true">
          {initials(name)}
        </span>
        <span data-part="text">
          <span data-part="name">
            <span data-part="label">{name}</span>
            {/* Знак немой: расшифровку несёт строка под именем. */}
            <span data-part="badge" aria-hidden="true" />
          </span>
          <span data-part="since">
            {KIND_LABEL[kind]} {since}
          </span>
        </span>
      </div>
    </>
  )
}