Ink spoiler
Text kept under a fine drifting ink until it is asked for. Press it and the ink blows outward from where you pressed while the words come through; press again to cover them.
- Name
- Billing webhooks
- Secret key
- Created
- 21 Oct 2026 by Mara Chen
When to use
- Secrets shown once: API keys, recovery codes, a one-time link.
- Spoilers and answers in content people choose to read.
When not to use
- Passwords in forms; use the password field.
- Anything people need to scan quickly.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/ink-spoiler
Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
InkSpoiler
4 props
PropTypeDefault
label *string—
children *ReactNode—
defaultRevealedbooleanfalse
classNamestring—
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-pressed, aria-label and aria-hidden in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/ink-spoiler.mdThe index of every part is at /llms.txt.
More in Loaders & text
Secret fieldA secret shown only on purpose: reveal it and the characters settle into place, and it masks itself again on a visible timer. Copying never needs it revealed.Copy buttonCopies a value and confirms what was copied, with a fallback when the clipboard is blocked.Password fieldA password input with a show and hide control.