KQ-944 · SEARCH/HIGHLIGHT

Search Highlight

A search field over a log, and the log lights up under it. Every match becomes a mark whose wash sweeps in from its left edge by its own background size — never a transform, so the text is not scaled — on snap, staggered by cascade so a screenful lights inside the choreography budget; the current match is ringed and seated into view by its own offset. The counter rolls a digit at a time and shares one grid cell with the pattern error, and Enter steps forward, Shift+Enter back, Escape clears.

KQ-944 · SEARCH/HIGHLIGHT
Match 1 of 3.
  1. Info, dock-worker, 11:02:04. batch 4471 picked up by shard 2
  2. Debug, gate-relay, 11:02:06. lease renewed, ttl 30s
  3. Warn, dock-worker, 11:02:09. retry 1 of 3 for batch 4471
  4. Info, gate-relay, 11:02:11. handshake accepted from dock-2
  5. Debug, dock-worker, 11:02:13. shard 2 backlog 18 items
  6. Warn, dock-worker, 11:02:15. retry 2 of 3 for batch 4471
  7. Error, dock-worker, 11:02:18. batch 4471 dropped after 3 retries
  8. Info, gate-relay, 11:02:20. north run clear
  9. Debug, gate-relay, 11:02:22. peer dock-2 answered in 12ms
  10. Info, dock-worker, 11:02:24. batch 4482 picked up by shard 1
  11. Debug, dock-worker, 11:02:27. shard 1 backlog 4 items
  12. Warn, gate-relay, 11:02:29. queue depth 212, above the mark
  13. Info, dock-worker, 11:02:31. batch 4482 drained in 412ms
  14. Debug, gate-relay, 11:02:34. backoff window 400ms
  15. Error, gate-relay, 11:02:36. handshake refused by dock-2
  16. Info, gate-relay, 11:02:39. retry window opens in 2s

No matches · plain

Install

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

$ pnpm dlx shadcn@latest add @kinetiq/search-highlight

Props

lines
SearchLine[]
default
The buffer, oldest first; matches are found in each line's text.
query / defaultQuery
string
default ""
Controlled or initial query.
onQueryChange
(query: string) => void
default
Fires from every keystroke and from the Escape clear.
regex / defaultRegex
boolean
default false
Controlled or initial regular-expression mode.
onRegexChange
(regex: boolean) => void
default
Fires from the pattern chip.
onMatchesChange
(count: number) => void
default
Fires when the number of matches changes.
onIndexChange
(index: number) => void
default
Fires when the cursor steps; -1 when there is nothing to step to.
onAnnounce
(sentence: string) => void
default
The sentence the polite region just spoke.
maxHeight
number
default 216
Scroll ceiling for the log box, in px.
label
string
default "Search log"
Names the search field.