Avatar

Company Mark

A company avatar: a squircle and a monogram — in a mixed list of people and companies the shape reads from the corner of the eye.

  • avatar
  • company
  • monogram
  • brand

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-011?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-011" (Company Mark) 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-011.json

Registry item: https://vibeui.ru/r/avatar-011.json
Installs to: components/vibeui/avatar-011.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 company avatar: a squircle and a monogram — in a mixed list of people and companies the shape reads from the corner of the eye.

A company avatar: a squircle, a monogram from the name and room for a logo. The palette derives from a single accent through color-mix. Zero dependencies, one file, no client JS.

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

<Avatar011 name="Polyot Studio" accent="oklch(0.55 0.15 145)" />

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-011-* palette — do not swap it for your theme tokens
- the squared shape: next to round people avatars a company is instantly distinct
- object-fit: contain with padding for the logo — someone else's mark must not be cropped
- deriving background and text from the accent through color-mix: one value sets the brand colour
- stripping quotation marks in the monogram — a quoted name must yield its first letter
- the aria-label with the full name instead of a single letter

## 6. You may change
- name and the logo src
- the accent through the accent prop — the brand colour
- size — sm, md or lg
- the corner radius for your style

## 7. Rules
- The monogram is a fallback: show the logo when you have one.
- Two-word names sometimes deserve two letters: the rule is one function away.
- A very dark accent makes the letter unreadable: color-mix lightens the background but checks no contrast.
- 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-011.json
https://vibeui.ru/r/avatar-011.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-avatar-011-*. Серверный: хуков нет. Фон, текст и граница выводятся из одного акцента через color-mix, поэтому цвет бренда задаётся одним пропом. Логотип вставляется с object-fit: contain и внутренним отступом — обрезать чужой знак нельзя. Монограмма берёт первую букву названия, отбрасывая кавычки.

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 Avatar011Props = Omit<
  ComponentPropsWithoutRef<"span">,
  "children"
> & {
  name?: string
  src?: string
  size?: "sm" | "md" | "lg"
  accent?: string
}

// Идея компонента: аватар организации, а не человека. Форма — скруглённый
// квадрат: в списке из людей и компаний круг и квадрат различаются боковым
// зрением, а цвет и буква — нет. Монограмма берёт первую букву названия,
// артикли и кавычки при этом пропускаются.
const STYLES = `
:where([data-vibeui-block="avatar-011"]){
--vibeui-avatar-011-size:2.75rem;
--vibeui-avatar-011-accent:oklch(0.55 0.13 255);
--vibeui-avatar-011-bg:color-mix(in oklab,var(--vibeui-avatar-011-accent) 16%,oklch(1 0 0));
--vibeui-avatar-011-fg:color-mix(in oklab,var(--vibeui-avatar-011-accent) 75%,oklch(0.2 0.02 265));
--vibeui-avatar-011-border:color-mix(in oklab,var(--vibeui-avatar-011-accent) 28%,oklch(1 0 0));
--vibeui-avatar-011-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="avatar-011"]{
display:inline-flex;align-items:center;justify-content:center;flex:none;vertical-align:middle;
box-sizing:border-box;
width:var(--vibeui-avatar-011-size);height:var(--vibeui-avatar-011-size);
/* Скруглённый квадрат: компания в списке людей должна быть видна формой. */
border-radius:calc(var(--vibeui-avatar-011-size) * 0.26);
border:1px solid var(--vibeui-avatar-011-border);
overflow:hidden;
background:var(--vibeui-avatar-011-bg);color:var(--vibeui-avatar-011-fg);
font-family:var(--vibeui-avatar-011-font);
font-size:calc(var(--vibeui-avatar-011-size) * 0.4);font-weight:700;line-height:1;
letter-spacing:-0.02em;user-select:none;
}
[data-vibeui-block="avatar-011"][data-size="sm"]{--vibeui-avatar-011-size:2.25rem}
[data-vibeui-block="avatar-011"][data-size="lg"]{--vibeui-avatar-011-size:3.5rem}
[data-vibeui-block="avatar-011"] img{width:100%;height:100%;object-fit:contain;display:block;padding:12%;box-sizing:border-box}
[data-vibeui-block="avatar-011"] [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-011"] *{animation:none!important;transition:none!important}}
`

// Кавычки и артикли не несут смысла в монограмме: «Полёт» должен дать «П».
function monogram(name: string) {
  const clean = name.replace(/[«»"'`]/g, "").trim()
  return clean ? clean[0].toUpperCase() : "?"
}

/**
 * Аватар организации: скруглённый квадрат и монограмма вместо инициалов.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Avatar011({
  name = "Студия «Полёт»",
  src = "",
  size = "md",
  accent,
  className,
  style,
  ...props
}: Avatar011Props) {
  const palette = {
    ...(accent ? { "--vibeui-avatar-011-accent": accent } : null),
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-avatar-011" precedence="medium">
        {STYLES}
      </style>
      <span
        {...props}
        data-vibeui-block="avatar-011"
        data-size={size}
        className={className}
        style={palette}
        role="img"
        aria-label={name}
      >
        {src ? (
          <img src={src} alt="" loading="lazy" decoding="async" />
        ) : (
          <span aria-hidden="true">{monogram(name)}</span>
        )}
      </span>
    </>
  )
}