通过扫光渐变为文字增加持续流动的高光效果,适合做标题、强调词和品牌文案。
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| duration | 单次扫光动画时长,单位秒 | number | 1.5 |
| delay | 首次开始动画的延迟,单位秒 | number | 1.5 |
| class | 自定义类名,文字颜色由 currentColor 决定 | HTMLAttributes['class'] | undefined |
| 名称 | 说明 |
|---|---|
| default | 要显示的文字或行内内容 |
<template>
<FaTextShiny class="text-4xl font-black text-sky-600 dark:text-sky-400">
Fantastic-admin
</FaTextShiny>
</template><template>
<FaTextShiny :duration="1.1" :delay="0" class="text-3xl font-bold text-amber-600 dark:text-amber-400">
快速扫光
</FaTextShiny>
</template><template>
<p class="text-2xl font-bold">
适合做
<FaTextShiny class="text-rose-600 dark:text-rose-400">
行内重点强调
</FaTextShiny>
。
</p>
</template>