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-members

Usage

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

<InviteMembers members={members} shareLink="acme.com/p/launch" onInvite={(email) => invite(email)} onRoleChange={setRole} />

API reference

PropTypeDefaultDescription
members{ id, name, email, role, src? }[]requiredPeople with access.
rolesstring[]["Owner", "Editor", "Viewer"]Choices in each role select.
onInvite(email: string) => voidCalled with a valid email.
onRoleChange(id: string, role: string) => voidCalled when a role changes.
shareLinkstringShows a link row with a copy button.

View the source on GitHub