Skip to documentation

Design system / Molecules

Molecule / Member management

MemberInvitationField

MemberInvitationField composes controlled email entry, associated help/error text and a bottom-aligned Invite {plural} command. Validation and saving remain in the product behavior hook.

Live example

Live preview

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

Fictional emails; this specimen saves nothing.

Responsibility

Label, Textarea, helper text and Button complete one email-entry concern. The surrounding MemberManager supplies type headings; domain hooks validate and save.

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
id / configstring / MemberManagerConfigRequiredUnique owner ID plus explicit singular/plural labels and existing copy.
value / onChange / onAddstring / callbacksRequiredControlled draft and add intent; no transport or validation rules.
disabled / saving / error / notice / inputInvalidstate propsRequired / optionalInvitation-only feedback. inputInvalid explicitly marks validation failures and associates the error with the textarea; network/authorization failures do not mark it invalid.
childrenReactNodeOptionalAdditional content before the bottom-aligned add action.

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.

The molecule owns no draft or request state. MemberManager supplies a useId-based prefix. The disabled state blocks entry and adding; Enter remains a textarea newline.

Dependencies

  • Label
  • Textarea
  • Button
  • Text
  • MemberFeedback

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 / text-text-muted
Helper and feedback roles.
leading-compact
Text atom selects tight rhythm at the content owner.
gap-4 / mt-auto
Composition spacing and bottom-aligned action.

Boundaries and limitations

  • Intentionally renders a div, not a form, so it can be used within existing product forms.
  • Does not provision accounts, send emails or invent validation policy.

Where to make a change

Change common invitation entry here; change instance-specific labels and policy in its config/behavior hook. No new foundation atom was needed.

Selected real uses

MemberManager

The shared organism supplies current draft, lifecycle, commands and type-aware headings.

src/components/members/memberManager.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

<MemberInvitationField id={id} config={config} value={input} onChange={setInput} onAdd={save} disabled={saving} saving={saving} error={error} />

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.