Loading...
Installation
pnpm dlx @bucharitesh/cli@latest add text-highlight
Props
| Prop | Type | Description | Default |
|---|---|---|---|
| children | ReactNode | The text content to highlight | - |
| color | string | RGB values (space-separated, e.g. "255 232 62") | required |
| angle | string | Gradient angle (e.g. "50deg") | "50deg" |
| rotate | string | Rotation applied to the highlight (e.g. "1deg") | "0deg" |
| scale | string | Scale applied to the highlight (e.g. "1.1") | "1" |
| skew | string | Skew applied to the highlight (e.g. "-5deg") | "0deg" |
| size | "sm" | "default" | "lg" | Size of the highlighted text | "default" |
| className | string | Additional class names | - |
Credits
- Credit to Vivi Tseng (@vii120) for the original highlighted text effect with CSS gradients.
- Inspired by @artur_bien.