Shadcn Guest Morph
A pill of overlapping faces that morphs into a guest list, with an invite form and pending invites.
About Shadcn Guest Morph
What it is. GuestMorph is a pill with the faces of the people who said yes. Press it and it grows into a card, and each face flies to its row.
How it works. The list is grouped as Going, Maybe and Pending. The Invite button opens an email field. A valid address that is not already listed is added as Pending, and the card grows to fit it. A pending invite can be cancelled.
When to use it. Use it for an event, a shared plan or a trip. For a plain row of faces, use Avatar Stack.
For AI agents
Hand your agent this brief or the Markdown page, not a screenshot.
When to use
- Show who is coming to something, with a way to invite more people
- A compact list of replies that opens in place
When not to use
- A row of faces with no list behind it: use Avatar Stack
Agent notes
- Named export
GuestMorphand theGuesttype from@/components/custom/blocks/GuestMorphBlock. - It keeps its own copy of
guests. Read changes throughonChange. onInviteruns before the invite shows as Pending. Throw anErrorto show its message instead.- Escape, the close button or a press outside folds the card back, and focus follows.
- Two builds install to the same path, so add only one:
guest-morph(GSAP) orguest-morph-motion(Motion, sharedlayoutIdmorph). - Honours
prefers-reduced-motion: the card opens without the morph.
- Markdown
- /docs-md/nextjs-guest-morph.md
- Install
npx shadcn@latest add https://avaraui.com/r/guest-morph.json- Registry name
@avara-ui/guest-morph, through the shadcn MCP server- Index
- llms.txt lists every page, or add the agent skill once
Props Reference
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | Required | The name shown on the pill and as the card's heading. |
guests | Guest[] | Required | The starting list: id, name, status ("going" | "maybe" | "pending"), and optional note and since. |
onInvite | (email: string) => void | Promise<void> | undefined | Called with the email before the invite shows as Pending. A rejection shows its message. |
onChange | (guests: Guest[]) => void | undefined | Called with the list after an invite is sent or cancelled. |
...props | HTMLAttributes<HTMLDivElement> | undefined | Passed to the wrapper, including className. |
Works with other components
- Avatar Stack for a row of faces with no list.
How do I save an invite to my server?
Pass onInvite an async function that posts the email. The invite shows as Pending once it resolves, and throwing an Error shows its message under the field.
How does GuestMorph handle reduced motion?
When the visitor prefers reduced motion, the card opens and closes without the morph.