Feature Library

Intent bar: sentences into actions

0.32 CPU ms
A still of the Intent bar: sentences into actions demo
Still
The live demo starts when it’s in view.Type in the bar, or Type an example · Tab takes the grey words, ↓ the suggestions, Enter runs · click a chip to correct it · click a meeting to start a sentence

Type what you want in plain words (“move the budget check to after the analyst is back”, “book 45 minutes with the designer next week, not Friday”) and a small…

What it costs a frame

0.32 ms
GPU
not used
CPU, median
0.32 ms
CPU, 95th pct
2.21 ms
Draw calls
0
Weight
Light

Measured 15 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged CPU 0.29–0.58 ms). What ran: Measured typing: from the first frame the demo types the example sentences one letter every other frame into the real field (input events), so every frame parses the sentence, ranks the suggestions (each one parsed too), recolours the words, redraws the chips and works out the preview on the planner; at the end of each sentence it runs it (the planner redraws, with a move animated) and starts the next. Idle, nothing runs. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.322.21
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.272.28
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.412.34

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. A planner, calendar or booking tool you can tell what to do in one sentence
  2. A command bar that takes arguments in words, not forms (“assign the bug to the editor before Friday”)
  3. Quick add for tasks and events with dates in plain words
  4. Search filters typed as a sentence (“invoices from the analyst in Q3, not drafts”)
  5. Showing a parse back as chips the person can correct before anything happens
  6. Offline or private apps where sending typed text to a model is not an option

Pitfalls, in brief

  1. The grammar is English and small on purpose: it reads the sentences your intents describe, not any sentence.
  2. Return the same vocabulary object from vocab() until it changes.
  3. Spans index the typed text exactly because the folding (case, accents, curly quotes) is one character in, one out.
  4. Dates are whole calendar days (days.ts), not instants: give today() as a day in the person’s own zone, and turn days and minutes into instants yourself when you store them.
  5. “In March” said in April means this March (it ended under two months ago), “in January” means next year’s.
5 more in brief
  1. “May” is also a verb: the month is taken only after a preposition (“in May”), with a modifier (“early May”), a year or a day.
  2. preview() runs on every keystroke while the sentence is whole: keep it to a lookup or a small search, and keep side effects in run().
  3. Import intent-bar.base.css before intent-bar.css (or your own look).
  4. A whole word typed is kept.
  5. Enter runs the sentence only when it is whole and preview() found no error; otherwise it shakes and reads out what is missing.
10 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac, and in the planner showcase. Fully custom code.

WAI-ARIA Authoring Practices Guide (W3C): the combobox pattern (a text input owning a listbox, the highlight given by aria-activedescendant), the toolbar pattern for the chips (one Tab stop, arrow keys inside) and the menu button pattern for each chip’s corrections

Feature Library command palette: rank.ts, the word-start and in-order matcher that ranks the suggestions, copied unchanged

natural languagecommand barintentgrammarparserdatesrelative datestime windowsdurationsautocompleteinline completionsuggestionschipscorrectioncomboboxlistboxmenulive regionaccessibilitykeyboardschedulingplannerno modeloffline

Near it in the frame