Vanish Input
ProNewAn input with rotating hints whose text dissolves into dust when you send it.
Installation
pnpm dlx shadcn@latest add @viewport/vanish-input
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| label* | stringAccessible name for the field. The cycling placeholders are decorative. | — |
| placeholders* | string[]Hints that rotate while the field is empty. | — |
| onSubmit | (value: string) => voidCalled with the trimmed text as it starts to dissolve. | — |
| interval | numberMilliseconds each placeholder stays up. | 3200 |
| duration | numberMilliseconds the sweep takes to cross the text. | 520 |
| className | string | — |
Accessibility
- A real text input with a label you provide; hints are decorative.
- Sending is announced through a status region.
- Clears instantly, with no particles, under reduced motion.