KQ-1635 · PROSE/FILTER

Prose Filter

One search line that reads a sentence against a typed schema and turns it into field, operator and value chips docked above a results table. A phrase docks when you type the space after it: a ghost of its words rises a step and fades where they stood while the chip starts over them, scaled to their width, and flies to its slot on springs.snap with one crisp overshoot; results close up on springs.glide and arrive in a cascade. Words with more than one reading keep a dotted, dashed or wavy underline, Tab walks them and opens a listbox of meanings under the word, Enter docks the chosen one, and Backspace at the start of the line pulls the last chip back into editable text.

KQ-1635 · PROSE/FILTER

Invoices

11invoices

Finished phrases become filters when you type a space. Tab walks words with more than one meaning, arrows choose a meaning and Enter sets it. Backspace at the start pulls the last filter back to edit. Enter applies.

11 invoices
No.CustomerAmount
#1046GaugeworksOpen · Sep 29$1,200
#1130FernworksOpen · Sep 29$1,490
#1118ColdbrookOpen · Sep 27$920
#1080BasinworksOpen · Sep 21$6,950
#1152FieldlineOpen · Sep 18$2,010
#1056FernworksOpen · Sep 17$1,500
#1088GaugeworksOpen · Sep 15$1,530
#1100ColdbrookOpen · Sep 14$6,210
#1136FernworksOpen · Sep 13$3,400
#1070BasinworksOpen · Sep 11$1,670
#1142FernworksOpen · Sep 7$9,590

0 invoices · 0 chips

Install

One command — the source lands in your repo. Or copy it from the Code tab.

$ pnpm dlx shadcn@latest add @kinetiq/prose-filter

Props

schema
ProseSchema
default defaultProseSchema
What the line can read: { noun: { one, other, words }, fields } with enum (options with words, optional lead words), money, date (lead words, primary) and code fields.
rows
ProseRow[]
default defaultProseRows
The records the chips filter: { id, ...fields }.
defaultValue
string
default ""
A sentence read on first render; its finished phrases dock straight away and doubtful words stay in the line.
placeholder
string
default "Try: overdue invoices over 500 from Coldbrook"
The empty line's hint.
onQueryChange
(query: ProseQuery) => void
default —
Fires with { noun, clauses, text, unsure } on first render and whenever a chip docks, leaves, is pulled back or the line changes.
onApply
(query: ProseQuery) => void
default —
Fires from Enter or the apply button, after finished phrases have docked.
status
"ready" | "loading" | "error"
default "ready"
Whether the results have arrived: loading shows skeleton rows, error a Try again.
onRetry
() => void
default —
Try again was pressed after the results failed to load.
chipStyle
"segment" | "soft" | "outline"
default "segment"
Chip look: field, operator and value in three tinted segments, one soft wash pill, or a hairline outline.
underlineStyle
"dotted" | "dashed" | "wavy"
default "dotted"
The underline under words with more than one reading.
accent
string
default "var(--accent-bright)"
Chips, underlines, read-phrase washes and the live count, any CSS colour.
now
number
default defaultProseNow
Today in ms, for last month, this week, the last N days and month names (always the most recent one).
formatAmount
(amount: number) => string
default whole US dollars
Formats amounts in chips and rows.
maxRows
number
default 40
The most rows the table lists; it scrolls inside its box.
title
string
default "Invoices"
The heading before the sentence names its noun; it takes the noun's name once it docks.
height
number
default 520
Height of the surface in px.
disabled
boolean
default false
The line and the chips are inert; the surface dims.
className
string
default —
Classes for the outer surface.