← All components
Interaction / component

Prompt Bar

An agent composer with source mentions, slash commands, model selection, effort control and reactive sparks.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Complete React Bits composer: keyboard source/command menus, attachment chips, model choices, effort slider, animated selection glow, particle field and arrow-to-stop morph.
  • Demo sends locally, attaches a sample filename and inserts a sample dictated phrase. The Stop button ends the local busy state. No AI provider, upload or microphone service is called.
  • Use PromptBar.tsx callbacks to connect real services. defaultModel/defaultEffort are initialization props; changing initial effort in the playground intentionally resets the demo. Other controls preserve your draft. Enter submits, Shift+Enter inserts a line, Escape dismisses, and IME composition does not submit or select.
  • Pause preserves interaction state. Replay deliberately restarts the demo. Reduced motion removes decorative loops; background and offscreen work is suspended.
  • Full portable source, styles and notices are included; import the primitive for your own product context.
React 19.2Modern browsers

React Bits — David Haz · MIT + Commons Clause; reuse separately authorized. Exact notice bundled.

Hugeicons · MIT; installed packages include their notices.

Props

PropTypeDefaultDescription
backgroundstring#27272aSurface; see primitive interface for full options.
sparkColorstring#b39dffSparks; see primitive interface for full options.
widthnumber460Width; see primitive interface for full options.
radiusnumber16Radius; see primitive interface for full options.
sparkBoostnumber1Spark response; see primitive interface for full options.
defaultEffortstringMaxInitial effort; see primitive interface for full options.
pausedbooleanfalseFreeze decorative work without clearing input or current state.
replayTokennumber0Demo-only replay key: changing it starts a fresh local interaction.