Skip to content
Components100 / 118

Prompt Composer

The ask-anything box of an AI product, lit by a travelling rim light. A white-hot light runs round its edge, burning pink into violet: it slides to the point nearest your cursor, reads along above your caret as you type, dips to the suggestion you point at and flickers by the mic. Sending draws your words into the send button, which fires a ring of light.

AIInputFormRim lightSpringsGSAP
Move around the box, then typeTry a suggestion, then send

Tweak

LIVE

Copy

Props

7 props
  • name / headingstring
    The greeting and the line under it.
  • modelsstring[]
    Models in the inline picker.
  • model / onModelChangestring / (m) => void
    Controlled model.
  • suggestions{ label, prompt }[]
    Chips that type their prompt into the box.
  • onSend(prompt, model) => Promise<void> | void
    Send; while its promise is pending the box shows a thinking state.
  • onVoice(listening) => void
    Called when the mic is toggled.
  • classNamestring
    Extra classes.