API keys
Creating an API key in one card that springs between its list, a name form and the secret: the secret decodes once in a dark panel, then travels into the newest row and scrambles into its masked form. Revoke turns into Confirm in its row.
- Production
nw_live_••••••••7Q3f2 min ago - Staging
nw_test_••••••••x2Dd1 hr ago - CI deploys
nw_live_••••••••b8HwYesterday
Things to try
- Create a key. The card springs into a name form, and "Create key" travels down to become its submit button.
- Reveal the secret. Create turns the card into a dark panel where the secret decodes a character at a time.
- Copy it. The copy icon turns into a check.
- Press Done. The card springs back to the list, the secret slides into the newest row, and scrambles itself into its masked form.
- Revoke a key. Hover a row (or tab to it) and press Revoke. It turns into a red Confirm; press it and the row folds out of the list while the header says it's gone. Escape or tabbing away takes it back.
Install
npx shadcn@latest add https://your-docs-site/r/api-keys.jsonDependencies
The install command adds these for you. If you copy the code by hand, install them yourself.
npm install @base-ui/react @hugeicons/core-free-icons @hugeicons/react @remold-ui/react motionHow it works
- One card, three faces. The list, the name form and the secret are faces of one card. It springs its real height between them and clips what's inside, so nothing is scaled; each face's parts blur and scale in from just below their size.
- Things that travel. "Create key" and the secret move with Motion's
layoutId: the button into the form, the secret from the panel into its row. - Decode and mask. Revealing and hiding the secret use the same scramble hook, run in opposite directions. The subtitle reshapes with
Remold.Textto say what each step wants. - Revoking asks in place. The first press only arms it: Revoke turns into a red Confirm. Once it's gone the row folds away by height, and the card follows it exactly.
- Built on Base UI. The Live and Test switch is Base UI's Toggle Group.
The keys are made up.
Adopt your signature
Draw your signature or type your name: switching between them flows the ink you drew into a script and back, stroke by stroke.
Booking steps
Booking a hospital appointment, where every choice becomes part of the booking. The option you pick fills in and flies up into the summary; tap it there to change it and it flies back down.