Border Glow
Lights up the border of its child where the pointer is.
Usage
Move the mouse over the card.
tsx
<BorderGlow>
<Card>…</Card>
</BorderGlow>hover me
One edge
With position, only one edge lights up: the bottom of a header, the side of a panel.
tsx
<BorderGlow placement="bottom" tolerance={0.4}>
<header className="border-b-margo border-border">…</header>
</BorderGlow>hover me
Reference
| prop | type | default | |
|---|---|---|---|
children | ReactElement | — | a single element |
placement? | "all" | "top" | "right" | "bottom" | "left" | "all" | the whole border, or one edge |
tolerance? | number | 1 | the glow's radius, as a fraction of the child's longest side |