vue3-highlight-text
Vue3 Highlight Text
a vue3 directive of highlight text
Installation
npm install --save vue3-highlight-text
or
yarn add --save vue3-highlight-text
Quick Start
// vue project main file
import HighlightText from 'vue3-highlight-text'
app.directive('highlight', HighlightText({
mode?: string,
color?: string
}))
<template>
<div>
<span v-highlight="{
mode?: string,
color?: string,
className?: string,
content?: string,
keyword: string
}">
</div>
</tempalte>
If not use content property, the innerText of the directive wrapper will be as content.
<template>
<div>
<span v-highlight="{ keyword: string }">innerText</span>
</div>
</tempalte>
Related Packages
vue-on-click-outside
vue mixin/directive that does something when you click outside a container
169,297
31
vue3-sticky-directive
Vue3-sticky-directive is a powerful Vue 3 directive make element sticky. This is...
75,838
4
Version History
| Version | Released | License |
|---|---|---|
| 1.0.7 | MIT | |
| 1.0.6 | MIT | |
| 1.0.5 | MIT | |
| 1.0.4 | MIT | |
| 1.0.3 | MIT |