Blocks / Participant list

Participant list

People with role, status and order, reordered by drag or Alt + arrows.

import { ParticipantList, participantTone } from "@forgeron/ui";
/01 → Default
  1. Léa MartinClient · lea@acme.test2026-11-18 10:00 UTCApproved
  2. Karim AzizWitness · karim@acme.testTo act
  3. Jo BernardProvider · jo@acme.testWaiting

import { ParticipantList } from "@forgeron/ui";

export default function Default() {
  return (
    <div style={{ width: "100%", maxWidth: 520 }}>
      <ParticipantList
        label="Signers"
        editable
        colors
        defaultValue={[
          {
            id: "a",
            name: "Léa Martin",
            role: "Client",
            email: "lea@acme.test",
            status: "approved",
            at: "2026-11-18T10:00:00Z",
          },
          {
            id: "b",
            name: "Karim Aziz",
            role: "Witness",
            email: "karim@acme.test",
            status: "current",
          },
          {
            id: "c",
            name: "Jo Bernard",
            role: "Provider",
            email: "jo@acme.test",
            status: "waiting",
          },
        ]}
        onRemind={() => {}}
      />
    </div>
  );
}
/02 → Read only
  1. Léa MartinReviewerApproved
  2. Karim AzizReviewerRejected
  3. Jo BernardReviewerSkipped

import { ParticipantList } from "@forgeron/ui";

export default function ReadOnly() {
  return (
    <div style={{ width: "100%", maxWidth: 520 }}>
      <ParticipantList
        label="Reviewers"
        ordered={false}
        value={[
          { id: "a", name: "Léa Martin", role: "Reviewer", status: "approved" },
          { id: "b", name: "Karim Aziz", role: "Reviewer", status: "rejected" },
          { id: "c", name: "Jo Bernard", role: "Reviewer", status: "skipped" },
        ]}
      />
    </div>
  );
}
API → Props
PropTypeDefaultDescription
labelstring—Names the list: “Signers”.
value / defaultValue / onChange{ id, name, role?, email?, status?, at? }[]—The people, in order.
editablebooleanfalseReorder (drag, Alt + ↑ ↓, Alt + Home / End) and remove (Delete). reorderable and removable set them apart.
orderedbooleantrueWritten 1, 2, 3 before each name.
colorsbooleanfalseA bar in the person's colour, as on the fields.
onRemind(person) => void—A remind button on whoever is current.
actions(person, index) => ReactNode—More at the end of a row.
statusLabelsPartial<Record<ApprovalStatus, string>>—Other words for waiting, current, approved, rejected, skipped.
classNamestring—Extra classes.