Pill to card
overlaysProAn avatar pill that unfolds from its slot into a profile card with a FLIP morph; Escape or a click outside folds it back.
Introductory price until 31 December 2026. €79 after that.
Preview
Live demo. The theme switches the demo itself.
Code
The code is locked
Pill to card is part of Manniche UI Pro. A key unlocks the source of all 66 effects.
Buy · €49€49 · Introductory price until 31 December 2026. €79 after that.
- One-off payment
- One developer
- Sign in and create your key straight away
- No VAT (§ 19 UStG)
Have a key? Get the code with the CLI or MCP.
The key lives in MANNICHE_PRO_KEY, never in your code or a URL. How to set it up
npx shadcn@latest add @manniche-pro/pill-to-cardclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
PillToCardProps
| Prop | Type | Default | What it does |
|---|---|---|---|
name required | string | – | The person's name, shown in the pill and as the card's title. |
role | string | – | A line under the name in the card, e.g. a job title. |
avatar | ReactNode | – | The avatar. Defaults to the initials of name. |
children | ReactNode | – | The card's body. Each direct child fades in a little after the one before it. |
open | boolean | – | Controlled open state. |
defaultOpen | boolean | false | Open state on the first render, when uncontrolled. |
onOpenChange | (open: boolean) => void | – | Called when the card asks to open or close. |
closeLabel | string | 'Close profile' | Accessible name of the close button. |
Also takes every prop from Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role'>.
A11y
Keyboard
The pill is a button with aria-expanded, aria-controls and aria-haspopup dialog. Enter opens the card and moves focus to its first control, or to the close button named by closeLabel. Escape or the close button closes it and returns focus to the pill.
Screen reader
The pill reports expanded state. The card is a dialog and a click outside or focus leaving it closes it.
Reduced motion
Under reduced motion the pill and card swap at once.