Components › Blocks
Invite members
Invite by email, change each member's role, and copy a link that gives access.
Installation
npx plankui@latest add invite-membersUsage
import { InviteMembers } from "@/components/ui/invite-members";
<InviteMembers members={members} shareLink="acme.com/p/launch" onInvite={(email) => invite(email)} onRoleChange={setRole} />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| members | { id, name, email, role, src? }[] | required | People with access. |
| roles | string[] | ["Owner", "Editor", "Viewer"] | Choices in each role select. |
| onInvite | (email: string) => void | Called with a valid email. | |
| onRoleChange | (id: string, role: string) => void | Called when a role changes. | |
| shareLink | string | Shows a link row with a copy button. |