UI

Team members

Workspace members management block with a multi-email chip invite bar that flies chips into pending invites as seats roll, live search and role filtering, per-row role selects, and inline confirm-to-remove.

import { TeamMembers } from '@uthereal/ui/team-members'

Team members playground

Team members

7 of 12 seats

Invite as
Separate addresses with commas or press Enter. Invites expire in 7 days

Members 5

Filter by role
  • Emma CollinsYouemma@fieldnote.example
    Owner
  • Ava Mitchellava@fieldnote.example
    Role for Ava Mitchell
  • Marcus Johnsonmarcus@fieldnote.example
    Role for Marcus Johnson
  • Jasmine Brooksjasmine@fieldnote.example
    Role for Jasmine Brooks
  • Sofia Ramirezsofia@fieldnote.example
    Role for Sofia Ramirez

Pending invites 2

  • jordan.blake@fieldnote.exampleMember
  • priya.shah@harborline.studioViewer
Loading interactive preview…

Overview

TeamMembers manages a workspace roster from a single settings card. The header pairs the title with a rolling seat meter (used of seatLimit). Below it, a multi-email chip bar accepts typed or pasted addresses with a shared role selector and flies submitted email chips directly into the Pending invites list. The Members section filters live by search query and role, displays avatars and localized relative last-active timestamps, provides inline role selectors (locking owner rows), and swaps any removable member row into a two-step Cancel / Remove confirmation bar.

Use TeamMembers on SaaS workspace or organization settings pages that combine member administration with quick email invites. For a directory-backed invite flow with per-person roles and an upgrade banner, use Invite people. For editing permission matrices per role, use Roles and permissions.

Usage

'use client'
import {
  TeamMembers,
  type TeamInvite,
  type TeamMember,
} from '@uthereal/ui/team-members'

export function WorkspaceMembersSettings({
  members,
  invites,
  onMembersChange,
  onInvitesChange,
}: {
  members: TeamMember[]
  invites: TeamInvite[]
  onMembersChange: (next: TeamMember[]) => void
  onInvitesChange: (next: TeamInvite[]) => void
}) {
  return (
    <TeamMembers
      members={members}
      invites={invites}
      seatLimit={12}
      onMembersChange={onMembersChange}
      onInvitesChange={onInvitesChange}
      onInvite={async (emails, role) => {
        const res = await fetch('/api/team/invites', {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ emails, role }),
        })
        if (!res.ok) throw new Error('Invite failed')
      }}
      onRoleChange={(member, role) => {
        void fetch(`/api/team/members/${member.id}`, {
          method: 'PATCH',
          body: JSON.stringify({ role }),
        })
      }}
      onRemove={(member) => {
        void fetch(`/api/team/members/${member.id}`, { method: 'DELETE' })
      }}
    />
  )
}

Omit members, invites, and onInvite to render the default five-member sample workspace with two pending invites and locally simulated delivery (nothing is sent over the network).

Examples

At seat capacity

Set seatLimit equal to defaultMembers.length + defaultInvites.length to display the full-capacity warning tone on the seat meter and invite message until a member is removed or a pending invite is revoked.

Core team

All plan seats are occupied. Remove a member or revoke an invite to free a slot.

5 of 5 seats

Invite as
All 5 seats are taken

Members 4

Filter by role
  • Claire BennettYouclaire@northwind.example
    Owner
  • Devon Brooksdevon@northwind.example
    Role for Devon Brooks
  • Maya Okaformaya@northwind.example
    Role for Maya Okafor
  • Noah Kimnoah@northwind.example
    Role for Noah Kim

Pending invites 1

  • sam.rivera@northwind.exampleMember

Disable searchable, supply a custom roles list, and pass an empty defaultInvites array for compact repository or project rosters.

Project collaborators

Manage repository access without a search bar.

3 of 8 seats

Invite as
Separate addresses with commas or press Enter. Invites expire in 7 days

Members 3

Filter by role
  • Elena MoralesYouelena@harbor.example
    Owner
  • Liam O’Connorliam@harbor.example
    Role for Liam O’Connor
  • Hana Satohana@harbor.example
    Role for Hana Sato

Pending invites 0

  • No pending invites

Invite bar and member controls

Invite bar tokenization

Input eventBehavior
, / ; / SpaceCommits the current draft into validated email chips; incomplete text remains in the field
EnterCommits typed text when present, or submits all queued chips when the input is empty
Paste (multiple tokens)Splits on commas, semicolons, and whitespace; rejects duplicates against members and invites
Backspace (empty input)Removes the last email chip immediately
BlurAuto-commits a complete email address left in the input

Roster row states

Section / stateComposed controlsBehavior
Member row (default)Avatar, MorphSelect, ButtonShows display name (isYou adds youLabel), email, relative lastActive, role select, and remove button
Owner row (isOwner)Avatar + static role labelLocks role text aligned with sibling role pickers and hides the remove button
Inline confirm stateCancel outline button + Remove danger buttonSwaps in place with a danger row tint, moves focus to Cancel, and closes on Escape
Pending invite rowDashed initials badge + Resend / Revoke buttonsCatches flying email chips via shared layoutId; Resend shows loading then brief Sent tick

API reference

These serializable arguments and defaults come directly from the component schema.

ArgumentType / defaultDescription
titlestringDefault: "Team members"Heading and accessible section name.
descriptionstring—Supporting line below the heading. Pass an empty string (or null in React) to hide it.
rolesTeamRole[]Default: [{"id":"owner","label":"Owner"},{"id":"admin","label":"Admin"},{"id":"member","label":"Member"},{"id":"viewer","label":"Viewer"}]Selectable workspace roles with stable ids and labels. Owners keep their role locked.
defaultMembersTeamMember[]Default: [{"id":"emma","name":"Emma Collins","email":"emma@fieldnote.example","role":"owner","isOwner":true,"isYou":true,"lastActive":"2026-11-29T09:41:00Z"},{"id":"ava","name":"Ava Mitchell","email":"ava@fieldnote.example","role":"admin","lastActive":"2026-11-29T09:38:00Z","isOwner":false,"isYou":false},{"id":"marcus","name":"Marcus Johnson","email":"marcus@fieldnote.example","role":"member","lastActive":"2026-11-29T07:40:00Z","isOwner":false,"isYou":false},{"id":"jasmine","name":"Jasmine Brooks","email":"jasmine@fieldnote.example","role":"member","lastActive":"2026-11-28T16:12:00Z","isOwner":false,"isYou":false},{"id":"sofia","name":"Sofia Ramirez","email":"sofia@fieldnote.example","role":"viewer","lastActive":"2026-11-14T18:00:00Z","isOwner":false,"isYou":false}]Initial member rows when uncontrolled. Defaults to a five-person sample team. Edits do not reset a mounted instance.
defaultInvitesTeamInvite[]Default: [{"id":"jordan","email":"jordan.blake@fieldnote.example","role":"member","sentAt":"2026-11-19T14:00:00Z"},{"id":"priya","email":"priya.shah@harborline.studio","role":"viewer","sentAt":"2026-11-20T10:30:00Z"}]Initial pending invites when uncontrolled. Defaults to two sample addresses. Edits do not reset a mounted instance.
seatLimitintegerDefault: 12Total seats counting members and pending invites; shown in the rolling seat meter.
searchablebooleanDefault: trueShow the live member search in the lists header.
searchPlaceholderstringDefault: "Search by name or email"Placeholder text inside the search input.
allRolesLabelstringDefault: "All roles"Label of the role filter option showing every role.
inviteLabelstringDefault: "Invite people"Visible label of the invite field.
sendLabelstringDefault: "Send invite"Label of the send button; shows a count for bulk invites.
resendLabelstringDefault: "Resend"Label of each pending invite resend action.
revokeLabelstringDefault: "Revoke"Label of each pending invite revoke action.
cancelLabelstringDefault: "Cancel"Label canceling the confirm-to-remove state.
removeLabelstringDefault: "Remove"Label confirming a member removal.
removeQuestionLabelstringDefault: "Remove {name}?"Confirm-to-remove heading template; {name} fills the member name.
removeDetailLabelstringDefault: "They lose access to the workspace right away"Supporting line inside the confirm state.
youLabelstringDefault: "You"Badge marking the viewer’s own row.
membersLabelstringDefault: "Members"Heading of the member list section.
pendingLabelstringDefault: "Pending invites"Heading of the pending invites section.
seatsLabelstringDefault: "{used} of {limit} seats"Seat counter template; {used} fills seats taken, {limit} the limit.
inviteHintLabelstringDefault: "Separate addresses with commas or press Enter. Invites expire in 7 days"Hint under the invite field at rest.
seatsFullLabelstringDefault: "All {limit} seats are taken"Warning when every seat is in use.
seatsLeftLabelstringDefault: "{count} {noun} left"Seat capacity note with a singular or plural noun.
overLimitLabelstringDefault: "Remove {count} {noun} to send"Warning when typed chips exceed the seats left.
invalidEmailLabelstringDefault: "“{value}” is not a complete email address"Error for a token that is not a valid address.
duplicateMemberLabelstringDefault: "{name} is already a member"Error when a member is invited again.
duplicateInviteLabelstringDefault: "{email} already has a pending invite"Error when an address is already invited.
emptyInviteLabelstringDefault: "Add at least one email address"Error when sending with an empty field.
noMembersLabelstringDefault: "No members match “{query}”"Empty member list state; {query} fills the search.
noInvitesLabelstringDefault: "No pending invites"Empty pending list state.
clearSearchLabelstringDefault: "Clear search"Label of the empty-state action clearing the search.
roleChangedLabelstringDefault: "{name} is now {article} {role}"Status after a role change.
invitedLabelstringDefault: "Invited {email} as {article} {role}"Status after a single invite lands.
invitedManyLabelstringDefault: "Invited {count} people as {article} {role}"Status after a bulk invite lands.
removedLabelstringDefault: "{name} was removed from the workspace"Status after a member removal.
resentLabelstringDefault: "Invite resent to {email}"Status after a resend completes.
revokedLabelstringDefault: "Invite to {email} revoked"Status after an invite revocation.
sentJustNowLabelstringDefault: "Invited just now"Sent label for invites that just landed.
resentJustNowLabelstringDefault: "Resent just now"Sent label updated after a resend.
sentLabelstringDefault: "Sent"Label shown briefly after a resend completes.
inviteActionstring—Registered host action requested when invites are sent; fires once per address.
roleChangeActionstring—Registered host action requested when a member’s role changes.
removeActionstring—Registered host action requested when a member removal is confirmed.
resendActionstring—Registered host action requested when an invite is resent.
revokeActionstring—Registered host action requested when an invite is revoked.
localestring—BCP 47 locale for relative last-active and sent labels; inherited when omitted.
recipestudio | softDefault: "studio"Visual treatment. Both recipes preserve interaction behavior.
themeTeamMembersThemeDefault: {}Color mode, accent, and typed semantic token overrides.
motionnone | subtle | expressiveDefault: "subtle"Animation preset. System reduced-motion preferences take precedence.
motionOptionsTeamMembersMotionOptionsDefault: {}Row, flight, height, and copy swap timing overrides in milliseconds.
dirltr | rtl—Reading direction; inherited from the page when omitted.
  • TeamRole accepts { id, label } with unique id values.
  • TeamMember accepts { id, name, email, role, avatar?, lastActive?, isOwner?, isYou? }; role must match a configured role ID and lastActive accepts an ISO-8601 timestamp.
  • TeamInvite accepts { id, email, role, sentAt? }; defaultMembers.length + defaultInvites.length must not exceed seatLimit.

React integration

PropPurpose
membersControlled member rows. Omit for uncontrolled state seeded by defaultMembers.
onMembersChange(members)Called with the updated member list after role changes or confirmed removals.
invitesControlled pending invite rows. Omit for uncontrolled state seeded by defaultInvites.
onInvitesChange(invites)Called with the updated pending list after invites land, resend, or revoke.
onInvite(emails, role)Called when invites are submitted. Return a Promise to hold the sending spinner until it settles; rejections show an inline error.
onRoleChange(member, role)Called when a member's role is updated from its inline select.
onRemove(member)Called when the user confirms removal inside the inline confirm bar.
onResend(invite)Called when Resend is activated. Return a Promise to hold loading until delivery settles.
onRevoke(invite)Called when Revoke removes a pending invite and frees a seat.
onAction(action, itemId)Called with inviteAction, roleChangeAction, removeAction, resendAction, or revokeAction and the email, member ID, or invite ID.
descriptionAlso accepts null or "" in React to hide the subtitle beneath the heading.
portalContainerPortal target forwarded to every MorphSelect role picker.
presetApplication defaults overridden by explicit instance arguments.
tokensCSS variables applied after the typed theme.
ref, className, styleApplied to the root <section> element.
Native attributesid, aria-*, data-*, and remaining <section> props forwarded to the root element.

Keyboard & accessibility

KeyAction
EnterCommits a typed email into a chip, or submits all queued chips when the input is empty.
, / ; / SpaceTurns the typed email address into a chip.
Backspace (on empty invite input)Removes the last queued email chip.
Escape (in confirm state)Cancels pending member removal and returns focus to that row's remove button.
TabMoves across the invite field, role select, send button, search, role filter, and row actions.
  • Rolling counters (RollingNumber) for seats used, member count, and pending invite count are marked aria-hidden="true" and paired with visually hidden full-text values so screen readers read "7 of 12 seats" instead of individual digits.
  • The seat bar exposes role="meter" with aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext.
  • Opening inline confirm-to-remove focuses Cancel automatically; confirming a removal or revoking an invite moves focus cleanly to the neighboring row's action button (or falls back to the search or invite input when the list empties).
  • Invite validation messages render in a polite aria-live="polite" slot referenced by aria-describedby, and a pre-mounted role="status" live region in the footer announces role changes, invites, removals, resends, and revocations.
  • Container queries adapt at five breakpoints: below 760px the footer stacks; below 640px last-active moves inline under email; below 600px header, invite controls, and search stack full width; below 480px confirm and pending rows stack vertically; below 420px member rows split identity above activity, role, and remove. Logical CSS properties support RTL (dir="rtl"), and @media (forced-colors: active) preserves borders and seat meter contrast.

Motion & theming

Submitted email chips share a scoped layoutId with their target pending invite row inside LayoutGroup, flying smoothly into place on the morph spring (420ms) while a landing highlight fades out over 600ms. Seat counts and section badges roll digit-by-digit (RollingNumber), measured rows expand and collapse on the bounce-free smooth spring (400ms), and status or confirm copy swaps rise through a soft blur.

Under prefers-reduced-motion: reduce, chip flights, row travel, blur, and landing animations turn off while status copy keeps a 120ms opacity crossfade. Setting motion="none" makes every transition immediate (0ms).

theme accepts mode, accent, and typed tokens across these groups:

Token groupCSS custom properties
core--ui-surface, --ui-surface-raised, --ui-text, --ui-text-secondary, --ui-muted, --ui-border, --ui-highlight, --ui-accent, --ui-accent-foreground, --ui-danger, --ui-focus-ring, --ui-radius, --ui-border-width, --ui-shadow, --ui-disabled-opacity, --ui-font, --ui-font-size, --ui-font-weight
extended--ui-surface-sunken, --ui-border-strong, --ui-border-subtle, --ui-track, --ui-info, --ui-success, --ui-warning, --ui-tone-foreground, --ui-overlay, --ui-tint-strength
shape--ui-radius-sm, --ui-popup-radius, --ui-surface-radius
control--ui-control-height, --ui-control-padding-x, --ui-control-gap, --ui-icon-size

An application-wide UtherealProvider supplies defaults.

Composition

In an agent composition, TeamMembers is a leaf block. Keep every member and invite role inside roles, keep defaultMembers.length + defaultInvites.length <= seatLimit, and wire only registered host actions. See Building with agents.

{
  "type": "TeamMembers",
  "props": {
    "title": "Team members",
    "description": "Manage who has access to this workspace.",
    "seatLimit": 12,
    "searchable": true,
    "inviteAction": "invite_team_member",
    "roleChangeAction": "change_member_role",
    "removeAction": "remove_team_member",
    "resendAction": "resend_team_invite",
    "revokeAction": "revoke_team_invite"
  },
  "children": []
}

On this page