Team & members
A React block (a whole screen) in Beamline's HR & payroll app, in the free sample.
The people page of a workspace: seats used against the plan, members and pending invitations in one list with search and a role filter, role changes that apply at once and step back if your API refuses, invitations by pasted email list, and removal with Undo that only reaches your API once the Undo window closes.
Use it for
- The Team or People page of a SaaS workspace: who is in, what they can do, who is still invited, and room on the plan.
- Any list of people with a role each that a manager edits (project members, shared inbox agents).
Not for
- What each role may do (roles-permissions).
- A compact members section inside a settings area (settings).
- Every account across many workspaces, for your own staff (admin-users).
Anatomy
- header: title, seats used of the plan (a rolling count over a thin meter), Invite people (the one primary action)
- toolbar: Members / Invitations with counts, search by name or email, role filter
- people table: person (initials avatar, name, email, You), role (a select, or a word where it cannot change), two-step sign-in, last active, row actions shown on attention; email and last active fold into the name line in a narrow room
- invitation rows: invited by and when, expiry, Resend, Copy invite link, Withdraw
- invite dialog: email list (paste many), role with its description, seats check before sending
- toasts: role changed, removed with Undo, failures with Retry
Variants
- view: members, invitations
States
- loading (rows in the list's shape)
- load failed (what, why, Try again)
- only you (first invite)
- no match for the search or filter (Clear filters)
- role change pending → applied, or refused and stepped back
- invite sending, failed (dialog keeps the list and says why), sent (rows grow in under Invitations)
- seats nearly full / full: the dialog says how many seats the invites need
- removed, Undo on offer for 5 s; then committed; a refused removal brings the row back
- resend: sending → sent; expired invitation
- partial data: last active unknown reads Never signed in or Unknown, never a blank
Keyboard
- Tab: Invite, view switch, search, filter, then each row's role and actions
- ↑/↓ inside the role select and the actions menu; Esc closes them and returns focus
- Invite dialog: Enter, comma or Tab adds an email; ⌘Enter sends; focus returns to Invite people
- Removing a row moves focus to the next row's control; Undo in the toast is reachable with Alt+T
Motion
Rows keep their path: an invited person grows in, a removed one fades where it stood while the rest close up, an undone removal grows back in place. The seat count rolls to its new number and the meter's fill eases. The view switch's thumb glides. Reduced motion places everything at once.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
members / defaultMembers / onMembersChange (required) | TeamMember[] | — | members: Everyone in the workspace and everyone invited, controlled: pass with onMembersChange. defaultMembers: The people to start from when the screen keeps its own copy. onMembersChange: The whole new list after an invite, a role change or a committed removal. |
roles | TeamRole[] | — | Roles people can be given. Default owner, admin, member, viewer. |
me | string | — | The signed-in person's id: marked You; their own role and removal are locked. |
seats | number | null | — | Seats on the plan; null or left out for no limit. Active members and live invitations count. |
onInvite | (emails: string[], role: string) => Promise<TeamMember[]> | — | Send invitations; resolve with the new invitation rows. A rejection keeps the dialog open with its message. |
onRoleChange | (id, role) => Promise<void> | — | A role change, applied at once; a rejection steps it back. |
onRemove | (id) => Promise<void> | — | Removes a member or withdraws an invitation, called when the Undo window has closed; a rejection brings the row back. |
onResend | (id) => Promise<void> | — | Sends an invitation again. Shows Resend on invitation rows. |
onCopyInviteLink | (id) => Promise<string> | string | — | The invitation's link, to copy. Shows Copy invite link on invitation rows. |
view / defaultView / onViewChange | "members" | "invitations" | — | view: Deprecated: Use filters.view. defaultView: Deprecated: Use defaultFilters.view. onViewChange: Deprecated: Use onFiltersChange. |
loading | boolean | — | The list is loading: rows in its shape. |
error / onRetry | ReactNode / () => void | Promise<unknown> | — | error: The list could not load: why, with Try again when onRetry is given. onRetry: Runs the retry action for the failed operation; no handler by default. |
domain | string | — | Your company's email domain ("northline.app"): a hint in the invite dialog, and outside addresses are named. |
level | 1 | 2 | — | Heading level: 1 when the screen is the page, 2 under your own page heading. |
className / classNames / style / ref | string / TeamMembersClassNames / CSSProperties / Ref<HTMLDivElement> | — | className: Classes on the documented visual root; no override by default. classNames: Classes for the named visual parts; no part overrides by default. style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default. |
members | TeamMember[] | — | Everyone in the workspace and everyone invited, controlled: pass with onMembersChange. |
defaultMembers | TeamMember[] | — | The people to start from when the screen keeps its own copy. |
onMembersChange | ((members: TeamMember[]) => void) | — | The whole new list after an invite, a role change or a committed removal. |
view | TeamView | — | Deprecated: Use filters.view. |
defaultView | TeamView | — | Deprecated: Use defaultFilters.view. |
onViewChange | ((view: TeamView) => void) | — | Deprecated: Use onFiltersChange. |
error | ReactNode | Error | — | The list could not load: why, with Try again when onRetry is given. |
onRetry | (() => void | Promise<unknown>) | — | Runs the retry action for the failed operation; no handler by default. |
className | string | — | Classes on the documented visual root; no override by default. |
classNames | Partial<Record<"root" | "header" | "empty" | "table" | "row" | "toolbar" | "toasts" | "… | — | Classes for the named visual parts; no part overrides by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no inline overrides by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented root element; no ref by default. |
manual | boolean | — | Server owns ordering, filters, search and page slicing. Default false. |
sort | ListSort | — | |
defaultSort | ListSort | — | |
onSortChange | ((sort: ListSort) => void) | — | |
filters | ListFilters | — | |
defaultFilters | ListFilters | — | |
onFiltersChange | ((filters: ListFilters) => void) | — | |
query | string | — | |
defaultQuery | string | — | |
onQueryChange | ((query: string) => void) | — | |
selected | string[] | — | Stable row IDs, retained across server pages. |
defaultSelected | string[] | — | |
onSelectedChange | ((ids: string[]) => void) | — | |
selectable | boolean | — | |
emptyLabel | string | — | |
allowSelectAllMatching | boolean | — | |
onSelectAllMatching | ((scope: { rowCount: number; query: string; filters: ListFilters; }) => void) | — | |
pagination | boolean | — | Enable page controls explicitly. Page-related props also enable them, unless onEndReached is supplied. |
page | number | — | One-based requested page. Default 1. |
defaultPage | number | — | |
onPageChange | ((page: number) => void) | — | |
pageSize | number | — | Positive rows per page. Default 25. |
defaultPageSize | number | — | |
onPageSizeChange | ((pageSize: number) => void) | — | |
rowCount | number | null | — | Total matching rows on the server. null means unknown. Local grids calculate it before slicing. |
total | number | null | — | Deprecated: Use rowCount. Canonical rowCount wins, including null. |
onEndReached | (() => void | Promise<unknown>) | — | Append mode: fetch another batch. The app appends it to the supplied rows. |
hasMore | boolean | — | Whether another batch exists; defaults to true with onEndReached. False stops requests. |
loadingMore | boolean | — | An append request is pending; retain every loaded row. |
Built from
- segmented-control
- search-field
- select
- table
- avatar
- badge
- dropdown-menu
- dialog
- tag-input
- button
- progress
- slot-text
- toast
- empty-state
- skeleton
- tooltip
Dependencies
lucide-react, motion
Import
import { TeamMembers } from "@beamline/team-members";
Get it
Team & members is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Team & members is included in the free MIT sample. Get Beamline · Connect your agent
More in HR & payroll
- Shift planner: A workplace's week of staff shifts against what it needs: a row per person with their week's hours against their contract, each day a 24-hour track with…
- Shift rotations: Rotating shift patterns from pattern to people: a pattern of one to four weeks painted day by day with a shift template, a rest day or nothing (pick the…
- Roster publishing: The week's roster before it goes out: areas down the side and days across, each shift a chip with who works it and its hours, its state its tone (not…
- My shift: The worker's own shift on their phone: today drawn to scale (the plan's areas as blocks on an hour axis, under them what was worked: on-plan time in…
- Timesheet review: Timesheets for a manager: the day's counts at the head (scheduled, on shift, late, on break, to approve), the ones that filter being buttons, an…
- Hours ledger: One worker's pay cycle of shifts, for the worker or their payroll admin: the wall-clock span and the paid hours as separate columns, a night shift…
- Payroll run: A pay period from report to submission, one payroll account at a time (a worker on two accounts is on both runs, never combined): the workers on one…
- Payroll cycles: The client's side of an outsourced payroll across countries: every entity's current cycle on one board, its stage drawn as steps, the one thing that…
- Payroll approvals: Payroll approvals for a company paying through a payroll provider. Expenses are split by whose move it is (you, another approver, the employee answering…
- Benefit changes: An employee's benefit changes after a life event. The centre puts their turn first: each task (a proof to upload, with its deadline in the warning tint…
- Hiring pipeline: A recruiting team's pipeline across every open job. Stage groups (reviewing, interviewing, closing) are counted across jobs above job sections that fold…
- Recruiter home: A recruiter's own work, in one place. Upcoming interviews with who sits in, today's first; feedback owed, overdue first and on the danger tone, written…
- Stage reports: Reports on how applications move through stages, built from each application's stage intervals. By week: applications present in each stage (or from each…
- Link booking: A candidate's booking link for one stage of one job: a column with the job, the stage's length, who they meet (each with their role), where and what the…