Text Highlight

A text effect that fill background of a text to highlight it.

Examples

With 3s delay

Rounded text background

Color from CSS variables: use the paintbrush icon in the top right corner to change the color.

With text color change.

API

Prop NameTypeDefaultDescription
delaynumber0Delay before the animation starts, in ms.
durationnumber2000Duration of the animation, in ms.
text-end-colorstringinheritColor of the text at the end of the animation. Match WCAG recommendations.

Component Code

You can copy and paste the following code to create this component:

TextHighlight.vue

Credits