Component packs › Synapse › Prompt Box
While the assistant thinks, light travels around the border and the send button turns into stop.
Prompt Box is an input from Synapse, a component pack with 6 components: The interface pieces every AI product needs. Price: free.
Built with: breathing border light, auto-grow, Enter to send.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
Install with the shadcn CLI: npx shadcn@latest add https://motionmart.store/r/prompt-box.json
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | ||
label | string | "Message" | Accessible name. Default "Message". |
onSubmit | (text: string) => unknown | Promise<unknown> | Return a promise to keep the box in its thinking state until it settles. | |
onStop | () => void | ||
autoplay | boolean | Showcase mode: types, sends and thinks on a loop. |
readonly value: stringsetThinking(thinking: boolean): voidfocus(): voidclear(): voiddestroy(): voidimport PromptBox from './PromptBox';
<PromptBox />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: AI product landing pages, AI chat and chat UI components.