ValyroUI English version

Avatar

Аватары пользователей. Бесплатно, MIT · Базовые элементы › Метки и подсказки

Установка

npx valyro-cli@latest add avatar
npx shadcn@latest add https://valyro.xyz/r/avatar.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { Avatar } from 'valyro-ui';

Пропсы

PropTypeDefault
srcstringImage URL. When omitted or failing to load, initials (or fallback) are shown instead.
namestring''Used for alt text, initials and the fallback color.
size'xs' | 'sm' | 'md' | 'lg' | 'xl'Avatar dimensions, from 20px (xs) to 64px (xl). Inside an AvatarGroup, defaults to the group's size.
shape'circle' | 'square''circle'Circle, or a square with corners rounded to a quarter of the size.
status'online' | 'offline' | 'busy' | 'away'Presence dot in the corner; also appended to the accessible name.
statusLabelstringSpoken status text appended to the name, e.g. "en ligne". Defaults to the status value.
fallbackReactNodeCustom fallback (e.g. an icon) instead of initials.

Похожие компоненты

  • Badge — Статусы и метки
  • Tooltip — Всплывающие подсказки
  • Separator — Разделители
  • Button — Кнопки всех типов
  • Icon Button — Кнопка с иконкой
  • Button Group — Группы кнопок
  • Copy to Clipboard — Копирование с подтверждением
  • Skeleton — Заглушки загрузки
  • Spinner — Индикатор загрузки
  • Progress Bar — Полосы прогресса

Назад: Badge · Далее: Tooltip · Весь раздел «Базовые элементы»