Skip to main content
Vuetify0 is now a release candidate!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

toHighlight API

Splits text into matched and unmatched chunks, returning a plain HighlightChunk[] for search-term highlighting.

Explore these related pages for additional context and usage patterns.

PageCategory
To HighlightTransformers
createFilterData
ComboboxForms
To ArrayTransformers

Functions

toHighlight

(text: MaybeRefOrGetter<string>, query?: MaybeRefOrGetter<string | string[] | undefined>, options?: ToHighlightOptions) => HighlightChunk[]

Splits text into matched and unmatched chunks. Pure transformer — returns a plain array. Wrap the call in computed() for reactive recomputation. Priority: options.matches (when non-empty) → query → no-match fallback.

Was this page helpful?

Ctrl+/