Component packs › Synapse › Prompt Box

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

Prompt Box props

PropTypeDefaultDescription
placeholderstring
labelstring"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
autoplaybooleanShowcase mode: types, sends and thinks on a loop.

Methods on the ref

Use it in React

import PromptBox from './PromptBox';

<PromptBox />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Synapse

Good for: AI product landing pages, AI chat and chat UI components.