ValyroUI Русская версия

Profile Card

User profile. Pro · Content and social › Social

Installation

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';

Props

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.

Related components

Previous: Comment Thread · Next: Reaction Bar · All Content and social