Avara UI

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

Agent notes

  • Named export GuestMorph and the Guest type from @/components/custom/blocks/GuestMorphBlock.
  • It keeps its own copy of guests. Read changes through onChange.
  • onInvite runs before the invite shows as Pending. Throw an Error to 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) or guest-morph-motion (Motion, shared layoutId morph).
  • Honours prefers-reduced-motion: the card opens without the morph.
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

PropTypeDefaultDescription
titlestringRequiredThe name shown on the pill and as the card's heading.
guestsGuest[]RequiredThe starting list: id, name, status ("going" | "maybe" | "pending"), and optional note and since.
onInvite(email: string) => void | Promise<void>undefinedCalled with the email before the invite shows as Pending. A rejection shows its message.
onChange(guests: Guest[]) => voidundefinedCalled with the list after an invite is sent or cancelled.
...propsHTMLAttributes<HTMLDivElement>undefinedPassed to the wrapper, including className.

Works with other components

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.