AstroAnimate Docs — Installation, Components & API

SlidingOverlayButton NEW

Button/link with sliding overlay animation on hover.

Preview/Playground

Created by
Creator
Prashanth
AstroAstro
---
import SlidingOverlayButton from "@astroanimate/core/SlidingOverlayButton";
---

<SlidingOverlayButton>
  Get Started
</SlidingOverlayButton>

Installation

bash
npm install @astroanimate/core

Usage

---
import SlidingOverlayButton from "@astroanimate/core/SlidingOverlayButton";
---

<SlidingOverlayButton />

Renders the SlidingOverlayButton component with AstroAnimate defaults.

Props

PropTypeDefaultDescription
as"button" | "a""button"Element type
hrefstring-Required if as="a"
type"button" | "submit" | "reset""button"Button type
classstring""Additional CSS classes

Use When

  • CTA buttons with directional hover feedback
  • Navigation links styled as buttons
  • Interfaces needing lightweight hover animation

Avoid When

  • Persistent or looping animations needed
  • Complex interactive button states required

Accessibility

  • Supports :focus-visible
  • Respects prefers-reduced-motion

Performance

  • CSS-only interaction effects
  • No JavaScript required

Credits