vue3-highlight-text

a vue3 directive of highlight text
84,789
Install
npm install vue3-highlight-text
Latest Version:1.0.7
License:MIT
Last Updated:Jan 14, 2022
Links: npm
Maintainer: wiensss

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-proportion-directive

vue 固定元素比例指令

6,003 10
ardirectives

Ardirectives

811
vue-on-click-outside

vue mixin/directive that does something when you click outside a container

169,297 31
vue-bind-once

A tiny, SSR-safe directive for binding random data to an element.

152,016 169
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