Ballmac UI home

Invite Members

Invite teammates by email: type or paste addresses into chips, flag invalid or duplicate ones with an explanation, pick a role, send, and manage pending invitations.

Invite teammates

They will get an email with a link to join.

Separate addresses with a comma, space or Enter. You can paste a list.

Pending (2)

  • kofi@acme.exampleMember · Sent 2 days ago
  • mei@acme.exampleViewer · Sent yesterday

Installation

$ pnpm dlx shadcn@latest add @ballmac/invite-members

Usage

import { InviteMembers } from "@/components/ballmac/invite-members"

The full example is in the Code tab above.

Examples

Minimal

Add people to Design

Only people you invite can see this team.

Separate addresses with a comma, space or Enter. You can paste a list.

API reference

PropTypeDefault
roles*

Roles people can be invited as.

InviteRole[]—
defaultRole

Role selected at first. Defaults to the first role.

string—
onInvite

Called with the valid invitations. Return a promise to show a sending state.

(invitations: Invitation[]) => void | Promise<void>—
pending

Invitations that were sent and have not been accepted.

PendingInvite[][]
onResend

Adds a Resend button on each pending invitation.

(email: string) => void—
onRevoke

Adds a Revoke button on each pending invitation.

(email: string) => void—
existing

Emails that already belong to the workspace; they are flagged instead of invited.

string[][]
title

Heading.

string—
description

Text under the heading.

string—
max

Most invitations per batch.

number20

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Enter / comma / spaceTurns typed text into a chip
BackspaceRemoves the last chip when the field is empty
Screen readersInvalid chips announce the problem; results are a polite status

Use with AI

roles[], onInvite(invitations), pending[], onResend/onRevoke, existing[]. Addresses split on comma, space, semicolon or Enter and validate as you go. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Invite Members (@ballmac/invite-members) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Team and workspace settings
  • Onboarding step for inviting colleagues

Not for

  • Searching existing users; use combobox
  • Single email field; use input

Registry JSON: https://ui.ballmac.com/r/invite-members.json

Credits

Free to use in personal and commercial projects.