ValyroUI English version

Profile Card

Профиль пользователя. Pro · Контент и соцсети › Соцсети

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add profile-card
npm install valyro-ui-pro

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

Пропсы

PropTypeDefault
name *stringDisplay name; also the card's accessible name and the avatar's initials.
handle *stringUsername shown as "@handle"; also seeds the generated cover.
avatarSrcstringAvatar image URL; initials of name are shown without it.
verifiedbooleanAdds a verified badge after the name.
biostringShort description under the handle.
locationstringPlace shown with a pin icon (vertical layout only).
website{ label: string; href?: string }Website line (vertical layout only); a link opening in a new tab when href is set.
joinedDateInputJoin date (Date, ISO string or epoch ms), shown as "Joined" month and year (vertical layout only).
statsProfileStatsCounts in compact form; only the given ones are shown. The horizontal layout shows followers only.
coverSrcstringCover image URL; falls back to a generated gradient.
coverSeedstringSeed for the generated cover gradient (defaults to the handle).
followingbooleanWhether the viewer follows this profile.
defaultFollowingbooleanfalseInitial following when uncontrolled.
onFollowingChange(following: boolean) => voidCalled with the new following when it changes.
onMessage() => voidShows the message button.
layout'vertical' | 'horizontal''vertical'horizontal is a compact row for lists and suggestions.
localestringLocale for counts and dates (default: the ThemeProvider's, then the browser's).
labelsPartial<ProfileCardLabels>Overrides for the built-in English text; keys left out keep their defaults.

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

  • Post Card — Карточка публикации
  • Comment Thread — Дерево комментариев
  • Reaction Bar — Лайки и реакции
  • Article Header — Шапка статьи: рубрика, заголовок, лид, авторы и дата
  • Byline — Подпись: авторы, дата публикации и обновления, время чтения
  • Article Figure — Иллюстрация с подписью и автором фото
  • Pull Quote — Выносная цитата с атрибуцией
  • Key Points — Блок «Главное» с ключевыми тезисами
  • Editor Note — Обновление, исправление, раскрытие и пометка о спонсорстве
  • Article Toc — Оглавление статьи с подсветкой текущего раздела
  • Reading Progress — Полоса прогресса чтения
  • Share Bar — Поделиться: Telegram, VK, X, WhatsApp, почта и копирование ссылки

Назад: Comment Thread · Далее: Reaction Bar · Весь раздел «Контент и соцсети»