Animation

Star Border

Radial comet rays sweeping along the edges of a rounded container. Run them forever or only on hover, mirrored on both edges or as a single ray.

Angular adaptation of an effect by David Haz / reactbits.dev.

Import

import { WrStarBorder } from 'ngwr/star-border';

Playground

Star border
<wr-star-border mode="infinite" rays="mirror" [speed]="6">
  Star border
</wr-star-border>

Customize

Mode
Rays
Speed (s)
6.0 s

As a button

The selector also works as an attribute — handy for buttons and links.

<button wr-star-border mode="hover" rays="single" type="button">
  Hover me
</button>

API

NameDescriptionTypeDefault
colorRay colour.stringtheme-aware (primary on light, white on dark)
speedSeconds per ray sweep.number6
thicknessVertical ray bleed past the panel (px).number1
modeAlways animating, or only on hover.'infinite' | 'hover''infinite'
raysRays along both edges, or just the bottom.'mirror' | 'single''mirror'