Rich text / foldkit-mixins-richtext
Find and replace text
findReplace<Message>() renders the search and replacement inputs, match counter (2 of 5 or No matches), and navigation/replace buttons. Keep query, replacement, current, and caseSensitive in your Model, advance current with stepMatch(current, count, step) in update, and overlay highlights using overlay(hostId, RichText.searchDecorations(...)).
| Slot | Capability | Renders |
|---|---|---|
root | Container | role="search" wrapper |
field | TextInput | Inputs with data-find="query" or "replacement" |
count | Container | Live match count (aria-live) |
button | Interactive | Controls keyed by data-find (previous, next, case, replace, replace-all, close) |