Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Profile Card

ProNew

A person as a search result: portrait, role and firm, every way to reach them with copy buttons, and a side rail for focus areas, awards and mentions.

Installation

pnpm dlx shadcn@latest add @viewport/profile-card

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
name*string—
hrefstring

Where the full profile lives. The name becomes a link, and a button copies the address.

—
imagestring

A portrait. Initials are shown without one.

—
badgestring

A short tag after the name: a rank, a role, a seniority.

—
organizationstring

The firm or company, shown under the name.

—
organizationHrefstring—
emailstring—
phonestring—
locationstring—
educationstring—
biostring

A sentence or two. Clamped to two lines.

—
links{ label: string; href: string; icon: React.ReactNode }[]

Icon links after the name, e.g. a LinkedIn profile.

[]
tagsLabelstring

The heading and chips of the first block in the side rail, e.g. practice areas.

"Focus"
tagsstring[]—
highlights{ label: string; icon?: React.ReactNode; content?: React.ReactNode }[]

Titled blocks under the chips, two to a row, e.g. Awards and Mentions.

[]
actionsReact.ReactNode

A menu or buttons in the top corner.

—
selectedboolean

Adds a checkbox and marks the card when it is selected. Pass it with `onSelectedChange`.

—
onSelectedChange(selected: boolean) => void—
classNamestring—

Accessibility

  • An article named after the person; the name is a real heading and link.
  • Copy buttons appear on hover and focus, are always shown on touch screens, and announce what was copied.
  • The rail moves under the details by the card's own width, not the viewport's.
  • Selection is a labelled checkbox and is reflected in the card's border.
  • Respects prefers-reduced-motion.