Toggle Sidebar B
AppearanceLight & dark mode D

Prompt Bar

Chat composer with an @ sources menu, a / commands menu, a model picker, dictation and attachments, whose send tile charges to ink the moment there is something to send and morphs its arrow into a stop square while busy.

Default

Type @ for sources or / for commands, use the plus button, the model and effort pickers, or the mic. Push the effort slider to the top for sparks.

Dark previewReplay previewOpen in new tab

Customize

Background
Ink
Menu
Spark
Spark Boost1
Width400px
Radius16px
Max Rows5
Morph240ms
Squash0.12
Tilt8°
Press Scale0.96

API Reference

PromptBar

PropTypeDefaultDescription
placeholderstring'Ask anything'Shown while the field is empty.
sourcesPromptBarSource[]DEFAULT_SOURCESRows of the @ menu and the plus button: key, name, description, icon (an Iconify name), and attach: true for the row that adds files.
commandsPromptBarCommand[]DEFAULT_COMMANDSRows of the / menu: key, name (with the slash), description.
modelsPromptBarModel[]DEFAULT_MODELSRows of the model picker: key, name, tag. An empty list hides the picker.
effortsstring[]DEFAULT_EFFORTSSteps of the effort slider, low to high. The last step turns the field to the spark colour with drifting sparks. An empty list hides the control.
defaultEffortstring''The step selected at first. Empty picks the middle.
defaultModelstring''Key of the model selected at first. Empty picks the first.
busybooleanfalseA response is in flight. The send tile stays ink and its arrow morphs into a stop square.
onAttach() => string | string[] | Promise<string | string[]>undefinedPicked the attach row. Return file names, or a promise of them, and they appear as chips.
onDictate() => string | Promise<string>undefinedThe mic. Return the transcript, or a promise of it, and it lands in the draft. Omit to hide the mic.
backgroundstring'#27272a'The field surface, and the glyph on an armed tile.
colorstring'#f5f5f5'The ink: text, icons, and the armed tile.
menuBackgroundstring'#323236'The surface of the menus and the effort popover.
sparkColorstring'#b39dff'The wash, the sparks and the slider at the top effort.
sparkBoostnumber1How strongly typing drives the sparks at the top effort: they rise faster, grow and glow brighter with typing speed, and flash on each keystroke. No sparks are added. 0 keeps them calm.
widthnumber400Field width in px, capped at the parent.
radiusnumber16Field corner radius in px.
maxRowsnumber5Rows the field grows to before it scrolls.
morphDurationnumber240Arrow to square and back, in ms.
squashnumber0.12Mid-morph pinch. The glyph narrows by this and grows taller to keep its area.
tiltnumber8Mid-morph lean in degrees, mirrored on the way back.
pressScalenumber0.96Scale of the send tile while a pointer is down.
EventDescription
sendEnter or the tile, with a non-empty draft or an attachment. Carries (text, { attachments, model, effort }). The draft and attachments clear.
stopThe tile while busy.
effort-changeThe effort slider moved, with the new step.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
EnterSends, or picks the highlighted menu row. Shift+Enter adds a line.
ArrowUp + ArrowDownMoves through an open menu.
TabPicks the highlighted menu row.
EscapeCloses the menu.
ArrowLeft + ArrowRight + Home + EndOn the effort slider, changes the step.
  • Menus are listboxes and the effort control is a slider with a text value. With prefers-reduced-motion the sparks and the glyph morph are dropped.