Toggle Sidebar B
AppearanceLight & dark mode D

Star Border

Animated star / sparkle border orbiting content with twinkle pulses.

Default

Color, thickness and speed are wired to the controls underneath. The root renders as a button unless you pass another element through the as prop.

Dark previewReplay previewOpen in new tab

Customize

Color
Thickness1px
Speed5s

API Reference

StarBorder

PropTypeDefaultDescription
asstring | ComponentbuttonAllows specifying the type of the parent component to be rendered.
colorstringwhiteChanges the main color of the border (fades to transparent)
speedstring6sChanges the speed of the animation.
thicknessnumber1Controls the thickness of the star border effect.
backgroundColorstring'#000000'Background color of the button surface.
textColorstring'#ffffff'Text color of the button content.
borderColorstring'#222222'Static border color around the button surface.
SlotDescription
defaultThe content shown inside the border.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
TabMoves focus to the root when it is a button or link.
EnterActivates the root when it is a button or link.
  • The two moving gradients are empty decorative divs, so only the slot content is read.
  • Pick a backgroundColor and textColor pair with enough contrast for the label.