40+ landing page components for ReactBrowse now

Primitives

User

Composite component that combines an Avatar with a name and optional description. Ideal for user cards, comments, and author bylines.

Installation

npm install @trinkui/react

Import

import { User } from "@trinkui/react";

Usage

JC

Jane Cooper

Software Engineer

Alex Johnson

Alex Johnson

Product Designer

Sizes

SU

Small User

sm size

MU

Medium User

md size

LU

Large User

lg size

Without Description

Jane Cooper

Jane Cooper

Props

PropTypeDefaultDescription
namerequired
stringUser display name
description
stringSecondary text (role, email, etc.)
avatarSrc
stringImage URL for the avatar; falls back to initials if omitted
avatarProps
AvatarPropsAdditional props forwarded to the inner Avatar component
size
"sm" | "md" | "lg""md"Size of the avatar and text
className
stringAdditional CSS classes

Accessibility

  • The avatar image receives the user's name as alt text.
  • When no image is provided, the initials fallback includes an aria-label with the full name.
  • Text truncation is handled with CSS to avoid layout overflow while keeping content readable.