GSAPGSAP Alert

GSAP Alert

Animated alert with slide-in, auto-close progress bar, and exit animations using GSAP.

Installation

$ npx @nehal712521/inprogress add gsap-alert

Requires: gsap, lucide-react

Preview

Success!

Your changes have been saved successfully.

Error!

Something went wrong. Please try again.

Warning!

Please review your information before continuing.

Info

This alert will auto-close in 5 seconds.

Usage

import { GSAPAlert } from "@/components/ui/gsap-alert";

<GSAPAlert variant="success" title="Success!" onClose={() => {}}>
  Your changes have been saved.
</GSAPAlert>

<GSAPAlert variant="info" autoClose={5000} onClose={() => {}}>
  Auto-closing alert
</GSAPAlert>