Contact Record Header
ProNewThe top of a person's record: portrait, name, role and company, slots for a score or tags and for actions, and a row of short facts such as owner and last contacted.
Installation
pnpm dlx shadcn@latest add @viewport/contact-record-header
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
| Prop | Type | Default |
|---|---|---|
| name* | string | — |
| title | stringTheir role, e.g. "Head of Revenue". | — |
| company | stringWhere they work. Becomes a link when `companyHref` is given. | — |
| companyHref | string | — |
| image | stringA portrait. Initials are drawn when there is none. | — |
| meta | React.ReactNodeSmall items under the name: a lead score, a relationship meter, tags. | — |
| facts | { label: string; value: React.ReactNode }[]Short facts in a row under the header, e.g. owner, last contacted, lifetime value. | [] |
| actions | React.ReactNodeButtons at the end: call, email, a menu. | — |
| as | "h1" | "h2" | "h3"The heading level for the name. | — |
Accessibility
- The name is a heading at a level you choose.
- Facts are a description list.
- Actions wrap under the name on narrow screens.
- Server component with no client JavaScript.