uiniverse

animations

ShimmerButton

A button with a CSS gradient sweep highlight on hover, drawing attention to primary CTAs.

v1.0.0react >=18next >=14tailwind >=4
buttonhovershimmerctahighlightgradient

Preview

Loading preview...

Props

PropTypeDefaultDescription
children*ReactNodeButton label or content
shimmerColorstringrgba(255,255,255,0.1)Color of the shimmer highlight
shimmerWidthstring200%Width of the shimmer gradient band
durationnumber1.5Duration of the shimmer sweep in seconds
classNamestringAdditional Tailwind classes
idstringHTML id attribute

Slots

SlotTypeRequiredDescription
childrenReactNodeYesButton label text or icon content

Layout

Display: inline-flex
Responsive: No

Renders as an inline-flex button element. Drop-in replacement for standard buttons.

Examples

Basic shimmer CTA

<ShimmerButton className="bg-white text-black">
  Get Started
</ShimmerButton>

Branded shimmer color

<ShimmerButton
  shimmerColor="rgba(238,80,44,0.2)"
  className="bg-neutral-900 text-white border border-neutral-700"
>
  Launch App
</ShimmerButton>

Slow shimmer

<ShimmerButton duration={3} className="bg-gradient-to-r from-purple-600 to-pink-600 text-white">
  Explore
</ShimmerButton>

Combined with MagneticHover

<MagneticHover>
  <ShimmerButton className="bg-white text-black">
    Sign Up Free
  </ShimmerButton>
</MagneticHover>

AI Usage Hint

Use ShimmerButton for primary CTAs that need visual emphasis. The sweep highlight draws attention on hover. Customize shimmerColor to match your brand. Works as a drop-in button replacement.

Works Well With

MagneticHoverFadeUp