Design system / Molecules
Molecule / Member management
MemberCard
MemberCard places a supplied display name or email beside header actions. Account status and metadata follow, then optional full-width body content.
Live example
Current component with fictional data. Example changes are not persisted.
Alex Contributor
member01@example.test
Example edition
3 example contributions
Responsibility
This members-owned molecule is the shared card anatomy. It has no collection, page, source-index or reviewer-control responsibilities. MemberList can repeat it without duplicating its markup.
Public contract
The table describes supported inputs, exported parts and caller responsibilities. A callback supplies a command, such as saving a draft. These notes are maintained manually; check current source types before integration.
| Prop / part | Type | Requirement | Responsibility |
|---|---|---|---|
| member | MemberEntry | Required | Display record with email, linkage and optional displayName. A supplied name appears first with email below; otherwise email is the identity label. Neither label selects mutation identity. |
| showContext / showStats | boolean | Optional | Show supplied metadata without inferring feature policy. |
| actions | ReactNode | Optional | Controls share the identity row. The owner supplies their labels, capabilities, disabled state and commands. |
| children | ReactNode | Optional | Full-width feature content below the account badge and metadata. This slot does not add reviewer policy to the card. |
API notes are curated documentation, not generated types. The source linked above is the current implementation; update these notes alongside API changes.
State and behavior
Identify which values the caller controls and which behavior the component or underlying primitive owns. A local example does not supply persistence, authorization or a complete product lifecycle.
Stateless presentation. Account linked, awaiting account, saving assignment and unknown linkage derive from the pure member model. Inactive styling strikes through identity without changing linkage. The card does not add, remove, exclude or assign anyone.
Dependencies
- Text
- Badge
- memberAccountStatus / memberStatusLabels
- cn
Token and styling contract
These notes identify theme roles, utilities and direct style values used by the source. Direct colors or timings are implementation exceptions, not recommendations to bypass the theme.
text-supporting / leading-compact- Canonical Text atoms select fluid supporting size and tight rhythm.
Badge secondary / outline- Linked versus other account-link states.
@container / min-w-0 / space-y-3 / p-3- The card defines the width context for responsive body content.
flex / items-start / gap-2 / shrink-0 / break-all- Identity wraps within its column while header actions stay together; long addresses remain inside the card.
Boundaries and limitations
- Renders a div, not a li; the list owns collection semantics and stable keys.
- Does not decide whether removal is allowed or how feature commands identify a member.
Where to make a change
Change shared member anatomy here. Change list mapping/index binding in MemberList and product-specific controls in their feature owner. Do not add reviewer imports or mutation policy to this card.
Selected real uses
MemberList
The list composes supplied header controls and shared removal into actions, then passes renderMemberBody content as children.
src/components/members/member-list.tsxThese traces describe selected uses, not every dependency. Repository-only paths are shown as references; only approved files have public source views.
Usage contract
<MemberCard member={member} showContext actions={headerActions}>
{memberBody}
</MemberCard>Illustrative consumer bindings, not a self-contained product workflow. Live examples supply only local state or explicit fictional props.