Skip to documentation

Design system / Molecules

Molecule / Member management

MemberList

MemberList repeats MemberCard with stable keys and original source indices. Header controls and body content use separate slots; the list adds shared removal when supplied.

Live example

Live preview

Current component with fictional data. Example changes are not persisted.

  • member01@example.test

    Awaiting account
  • member02@example.test

    Account linked
  • member03@example.test

    Account linked

Responsibility

MemberList owns collection semantics, stable keys and original source-index binding. MemberCard owns each row's anatomy. The directory organism owns filtering, paging and modal lifecycle.

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.

Maintained component API notes; current source is authoritative
Prop / partTypeRequirementResponsibility
entries / configIndexedMember[] / MemberListConfigRequiredVisible page plus original source indices, list label and metadata flags. No invitation-form configuration is required.
savingbooleanRequiredDisable shared removal while saving. A pending member also disables its removal button.
onRemove / removeLabel / canRemoveMembercallbacksOptionalonRemove receives the displayed email and original source index. The owner resolves the operation identity. Omit onRemove to hide removal for the list; canRemoveMember hides it per row.
renderMemberActions(member, sourceIndex) => ReactNodeOptionalHeader controls appear beside identity and before shared removal. For reviewers, this slot supplies Exclude or Include.
renderMemberBody(member, sourceIndex) => ReactNodeOptionalFull-width content below identity, account status and metadata. For reviewers, this slot supplies ReviewerCategoryAssigner.

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.

No local state or requests. Each li has an immutable member.id key and wraps one MemberCard. Both slots receive the original source index, not the member's position on a filtered page. The owner disables or omits controls inside supplied slots.

Dependencies

  • MemberCard
  • Button
  • Lucide X
  • IndexedMember

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.

divide-y / border / rounded-md
Collection separation and framing.
ghost / icon Button
Optional shared removal affordance.
MemberCard
Display name, email, account badge and body layout remain inside the shared card.

Boundaries and limitations

  • The owner supplies empty state outside this list.
  • The list does not authorize commands or choose user IDs and invitation IDs. Server operations enforce access independently.
  • Use immutable row IDs and original indices so filtered reviewer writes target the correct assignment.

Where to make a change

Change list semantics and slot binding here. Change common row anatomy in MemberCard. Review rounds own exclusion and category controls in separate molecules; neither belongs in the shared card or list.

Selected real uses

MemberDirectorySheet

The directory supplies a filtered page and forwards both slots from the owning instance. Source indices remain unchanged after search and pagination.

src/components/members/memberDirectorySheet.tsx

These traces describe selected uses, not every dependency. Repository-only paths are shown as references; only approved files have public source views.

Usage contract

<MemberList entries={directory.entries} config={config} saving={saving}
  onRemove={remove} canRemoveMember={canRemoveMember}
  renderMemberActions={renderHeaderActions}
  renderMemberBody={renderCategoryAssigner} />

Illustrative consumer bindings, not a self-contained product workflow. Live examples supply only local state or explicit fictional props.

All molecules
Current components and theme tokens. Fictional example data. Source views refresh on deployment; authors maintain contract notes.