Member Card
A member row carries four different situations wearing the same face: someone active, someone invited who never accepted, someone from another company on borrowed time, and someone suspended. Each needs different words and a different list of things you can do about it.
The decision inside it
The menu is derived from the row
A generic View / Edit / Remove is identical on every row and so tells an admin nothing. “Remove from workspace” on someone who never accepted the invite is a lie about what is being undone.
Installation
How you get it
One command. The CLI writes the file into components/ui/ and installs what it needs.
npx shadcn@latest add https://layropro.com/r/member-cardAPI
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
name | string | Display name. Falls back to the local part of the email. |
emailrequired | string | Email address. Doubles as the avatar seed, so a face is stable per person. |
avatar | string | Photo. The drawn portrait stands in until there is one. |
role | MemberRole | What they may do. |
status | MemberStatus | Where they stand. |
title | string | Job title or team, shown under the name when there is room. |
lastActive | string | Free-text activity line, e.g. "Active 2 hours ago". |
invitedAgo | string | How long a pending invite has been waiting, e.g. "6 days". |
accessEnds | string | When external access ends, e.g. "12 Oct". |
you | boolean | Marks the signed-in person; the name gets "(you)" and the menu is hidden. |
premium | boolean | The seat is on the paid plan. Drawn in gold, which is the one thing in this card that is neither neutral nor a warning. It is deliberately the last badge on the line: a pending invite is something an admin has to act on, a premium seat is something they are paying for, and the thing to act on comes first. |
showMenu | boolean | Show the overflow menu button. Ignored for an owner. Default: true. |
menuItems | MenuItem[] | Replace the menu's contents. The default list is derived from `status`, because the useful action on a row is almost always the one its standing implies — resend a stale invite, extend an expiring access, reactivate a suspended seat. |
interactive | boolean | Hover lift and press feedback. Default: true. |
onOpen | () => void | — |
onMenuSelect | (id: string, item: MenuItem) => void | Fired with the chosen item's `id`. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themeavatarmenurole-chipLifetime access
Every component, and everything we ship next.
- All 65 components, source included
- The template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in Workspace
Members Table
FreeSearch, filters, and a bulk bar that names its refusals before it runs.
Access Request Inbox
FreeApprove or deny with a reason, and an undo that releases what it superseded.
Roles & Permissions Matrix
PaidInherited permissions drawn differently from ones you granted directly.
Included with lifetime access