{"name":"prompt-bar","title":"Prompt Bar","description":"","kind":"block","category":"agent","status":"beta","props":{"shape":{"type":"enum","values":["pill","rounded"],"default":"rounded","description":"Radius only. rounded: card radius. pill: fully round while it is one line, 24px once it holds attachments or more lines."},"value":{"type":"string","model":true,"default":"","description":"The prompt text."},"placeholder":{"type":"string","default":"Write a message…"},"model":{"type":"string","model":true,"description":"Value of the selected model."},"models":{"type":"array","items":{"value":"string","label":"string","meta":"string?"},"description":"Model picker options (our select, sm and ghost)."},"sources":{"type":"array","items":{"value":"string","label":"string","description":"string?","icon":"'database' | 'chart-bar' | 'stack' | 'globe' | 'file-text' | 'folder' | 'link' | 'users' | 'envelope-simple' | 'chat-circle' | 'at'?"},"description":"Typing @ lists them (matched anywhere in the label); accepting inserts @Label. Also listed in the attach menu."},"commands":{"type":"array","items":{"value":"string","label":"string? (default /value)","description":"string?"},"description":"Typing / lists them (matched from the start); accepting inserts /value."},"attachments":{"type":"array","model":true,"items":{"name":"string"},"description":"Attached files, shown as removable chips. Strings are accepted as names."},"dictating":{"type":"boolean","model":true,"default":false,"attr":"aria-pressed","part":"dictate"},"busy":{"type":"boolean","default":false,"description":"The agent is working: the send button becomes a stop button and Enter does not send."},"aria-label":{"type":"string","default":"Prompt","description":"Accessible name of the textarea."}},"playground":{"name":"Playground","props":{"shape":"rounded","value":"Draft a renewal reminder for workspaces whose usage fell this month","model":"atlas-reason","models":[{"value":"atlas-large","label":"Atlas Large","meta":"Most capable"},{"value":"atlas-small","label":"Atlas Small","meta":"Fastest"},{"value":"atlas-reason","label":"Atlas Reason","meta":"Thinks longer"}],"sources":[{"value":"accounts","label":"Customer accounts","description":"1,284 workspaces, plans and MRR","icon":"users"},{"value":"tickets","label":"Support tickets","description":"Open and closed, last 90 days","icon":"chat-circle"},{"value":"metrics","label":"Product metrics","description":"Bookings, activation, churn","icon":"chart-bar"},{"value":"web","label":"Web search","description":"Public pages and news","icon":"globe"}],"commands":[{"value":"summarize","description":"Summarize this conversation"},{"value":"draft-email","description":"Write an email to a customer"},{"value":"query","description":"Ask the data warehouse in SQL"},{"value":"chart","description":"Chart the last result"},{"value":"ticket","description":"Open a support ticket"}]},"width":420},"exampleFiles":[{"file":"rounded","title":"Ask about churn risk"},{"file":"pill","title":"Stop an answer in progress"},{"file":"with-attachments","title":"Reconcile attached invoices"},{"file":"command-list-open","title":"Pick a slash command"}],"worstCase":[{"name":"Long and many","width":420,"props":{"shape":"pill","value":"Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, split by weather, promotion and staffing, and flag anything that looks like a supply problem rather than demand. Compare enterprise signups to last summer across every store, spl\nThanks!!!","attachments":["q3-regional-sales-breakdown-by-plan-and-region-final-final-v12.xlsx","a.png","supplier-contract-northern-hemisphere-summer-2026-signed-scan.pdf","تقرير-المبيعات-الأسبوعي.csv","🍦-photo-from-the-tasting-session.heic","pos-export.csv","very_long_file_name_without_any_spaces_or_dashes_at_all_whatsoever.txt","plan.pdf","revenue-chart.png","renewal-model-notebook-with-annotations-and-comments.ipynb","b","inventory-snapshot-2026-11-13T09-41-07Z.json"],"model":"legacy-draft","models":[{"value":"legacy-draft","label":"Legacy Draft 0.4 Extended Context Preview","meta":"Stale"},{"value":"v","label":"V","meta":"Basic"}],"sources":[{"value":"a","label":"A","icon":"at"},{"value":"long","label":"Quarterly supplier scorecards for the northern-hemisphere summer launch","description":"An unusually long description that has to truncate before it pushes anything out","icon":"folder"},{"value":"ar","label":"سجلات الحسابات","description":"٢٦ صانعاً ووسوماً وروابط","icon":"stack"}],"commands":[{"value":"compare","description":"Run compare"},{"value":"billing-plan","description":"A very long description that keeps going well past the width of the list so it has to truncate cleanly"},{"value":"restock","description":"Run restock"},{"value":"draft-email","description":"Run draft email"},{"value":"summarize","description":"Run summarize"},{"value":"forecast","description":"Run forecast"},{"value":"reorder","description":"Run reorder"},{"value":"price-check","description":"Run price check"},{"value":"audit","description":"Run audit"},{"value":"rollup","description":"Run rollup"},{"value":"translate","description":"Run translate"},{"value":"explain","description":"Run explain"},{"value":"outline","description":"Run outline"},{"value":"rewrite","description":"Run rewrite"},{"value":"shorten","description":"Run shorten"},{"value":"expand","description":"Run expand"},{"value":"tabulate","description":"Run tabulate"},{"value":"chart","description":"Run chart"},{"value":"schedule","description":"Run schedule"},{"value":"remind","description":"Run remind"},{"value":"assign","description":"Run assign"},{"value":"triage","description":"Run triage"},{"value":"dedupe","description":"Run dedupe"},{"value":"normalise","description":"Run normalise"},{"value":"export","description":"Run export"},{"value":"import","description":"Run import"},{"value":"archive","description":"Run archive"},{"value":"tag","description":"Run tag"},{"value":"search-everything-in-every-connected-workspace-at-once","description":"Run search everything in every connected workspace at once"},{"value":"x"}]}},{"name":"Right-to-left","width":420,"props":{"shape":"rounded","value":"قارن مبيعات المؤسسات في عطلات نهاية الأسبوع بالصيف الماضي","attachments":["تقرير-المبيعات.pdf"],"model":"lite-1","models":[{"value":"lite-1","label":"لايت ١","meta":"أساسي"}],"sources":[{"value":"sales","label":"بيانات المبيعات","description":"مقاييس المبيعات","icon":"chart-bar"}],"commands":[{"value":"compare","description":"قارن بالصيف الماضي"}]}}],"anatomy":[{"part":"root","element":"div","description":"data-slot=\"prompt-bar\"; shape, busy and the expanded layout (the text, or the placeholder while it is empty, needs the full width: controls drop to a second row, so a hint is never cut beside them) are recipe variants"},{"part":"composer","element":"div","description":"The bordered surface; anchors the suggestion lists"},{"part":"sweep","element":"canvas","description":"glimm shader canvas behind the content, invisible at rest; data-sweeping while the send sweep plays"},{"part":"attachments","element":"div","optional":true,"description":"role=list of attached files"},{"part":"attachment","element":"span","repeat":true,"description":"The real Tag (tone neutral; shape pill in a pill bar, rounded otherwise) as role=listitem, marked data-prompt-bar=\"attachment\"; the file glyph is its icon; a path-like name is middle-truncated"},{"part":"attachment-remove","element":"button","description":"The Tag's remove button (the real Button, ghost xs square, following the pill shape) with its tooltip Remove <name>; marked data-prompt-bar=\"attachment-remove\" through removeProps (an attribute object passed to Tag)"},{"part":"row","element":"div","description":"Grid of the input and the controls"},{"part":"attach","element":"div","description":"The real Menu, marked data-prompt-bar=\"attach\", with the attach trigger"},{"part":"attach-trigger","element":"button","description":"The real Button (ghost sm square muted, rounded unless the bar is a pill), marked data-prompt-bar=\"attach-trigger\"; aria-label Add attachments and sources"},{"part":"input","element":"textarea","description":"role=combobox, aria-autocomplete=list, aria-expanded, aria-controls and aria-activedescendant while a list is open; grows to a maximum, then scrolls"},{"part":"model","element":"div","description":"The real Select, sm and ghost, marked data-prompt-bar=\"model\" on its root"},{"part":"dictate","element":"button","description":"A <button> with the button recipe classes (ghost sm square muted, rounded unless the bar is a pill: its level bars must be its own flex item), data-slot=\"button\", marked data-prompt-bar=\"dictate\"; aria-pressed while dictating, when it keeps an accent tint; aria-label Start/Stop dictation and our tooltip"},{"part":"bars","element":"span","description":"Level bars shown while dictating, in place of the microphone"},{"part":"bar","element":"span","repeat":true},{"part":"send","element":"button","description":"The real Button (primary sm square, rounded unless the bar is a pill), marked data-prompt-bar=\"send\"; aria-label Send, or Stop generating while busy, and our tooltip"},{"part":"positioner","element":"div","description":"Fixed over the composer, rendered in a portal; one per list. Carries data-scope=\"prompt-bar\" data-part=\"positioner\", so it stacks like every popup (base.css). Exposes --available-height"},{"part":"list","element":"div","description":"The popup: the shared popup surface (`lib/popup.ts`). data-kind=source|command; data-state=open|closed; hidden while closed. Opened by typing, so it shows at once"},{"part":"options","element":"div","description":"role=listbox; scrolls"},{"part":"highlight","element":"span","description":"Shared gliding highlight layer (`glideLayer` of `lib/glide.ts`); glides under the pointer and the keyboard"},{"part":"option","element":"div","repeat":true,"description":"role=option; composes the shared option row (`lib/option.ts`, 36px through --option-height on the list: two runs of text). data-highlighted and aria-selected on the active option; hidden when filtered out"},{"part":"option-icon","element":"span","optional":true,"description":"The shared option row's icon (`lib/option.ts`)"},{"part":"option-label","element":"span","description":"The shared option row's text (`lib/option.ts`)"},{"part":"option-description","element":"span","optional":true,"description":"the shared option row's description (`lib/option.ts`)"},{"part":"empty","element":"div","description":"The real EmptyState (size row, start-aligned, 36px from the list --option-height), marked data-prompt-bar=\"empty\"; shown when nothing matches"},{"part":"footer","element":"div"}],"events":{"valueChange":"(value: string)","modelChange":"(model: string)","attachmentsChange":"(attachments: Attachment[])","dictatingChange":"(dictating: boolean)","submit":"({ value, model, attachments }) Enter or the send button; the bar then clears its text and attachments","stop":"() the stop button while busy","attach":"() 'Add photos & files' was chosen in the attach menu"},"states":["hover","press","focus-visible","focus-within","open","highlighted","busy","dictating","expanded","disabled"],"tokens":["duration.sweep","motion.popup-scale","color.surface","color.ink","color.ink-2","color.ink-3","color.line","color.line-strong","color.accent-tint","color.accent-ink","shadow.card","radius.window","radius.pill","text.2xs","text.sm","duration.base","duration.popup","easing.out-strong"],"a11y":{"role":"combobox (textarea) + listbox","keyboard":["Typing @ or / after a space (or at the start) opens the matching list; the first option is active; focus stays in the textarea","ArrowDown / ArrowUp move the active option (wrapping); the textarea announces it through aria-activedescendant","Enter or Tab accept the active option and insert @Label or /command; Escape closes the list until the text changes","With no list open: Enter sends, Shift+Enter inserts a newline; nothing sends while an IME composition is active or while busy","Model picker: our select (Enter / Space / ArrowDown open, arrows move, Enter selects, Escape closes)","Attach: our menu (Enter / Space / ArrowDown open, arrows move, Enter activates, Escape closes); choosing a source returns focus to the textarea","Each button is a tab stop: attach, model, dictation (aria-pressed), send / stop"],"notes":["Icon-only buttons carry aria-label and our tooltip with the same text: Add attachments and sources, Start / Stop dictation, Send / Stop generating, Remove <file>.","The suggestion lists open from typing, so they open and close without animation; the highlight glides between options for pointer and arrow-key moves alike.","16px text on coarse pointers so iOS does not zoom the page; enterkeyhint=send."]},"motion":["suggestion lists: the shared popup surface; opened by typing, so they show and hide at once (keyboard-instant). One highlight glides between options over duration.move, easing.out-strong, for pointer and arrow-key moves alike (the highlight is the one exception to keyboard-instant); a pressed option darkens to color.hover-2; \"No matches\" is the empty-state and fades in over duration.base","buttons: our button's press (scale to motion.press-scale over duration.press) and colour over duration.fast","composer: border colour and radius over duration.base (focus, pill growing past one line)","layout switch: when the text needs the full width (or no longer does) the controls and the input travel to their new place (translate) and the composer's height follows, together over duration.move, easing.out-strong (FLIP, flipRow in prompt-bar.logic.ts). Typing triggers it, so it is not keyboard-instant; typing back and forth across the threshold retargets from where things are. Never on first paint; instant under reduced motion","attachments: a tag pops in (fndn-pop-in, duration.popup) when it arrives","send: one glimm sweep across the composer per send, over duration.sweep (1000ms) at an even ease-in-out pace, then a fade-out at duration.slow; skipped under reduced motion and when WebGL is missing","dictation bars: loop while dictating; static under reduced motion"]}