The component animates a percentage counter from 0% to 100% over 2 seconds, then clips out the overlay and reveals the content with a smooth fade-in effect.
"use client" import { useState } from "react" import { LoadingOverlay } from "@/components/ui/loading-overlay"; export default function DemoOne() { const [loadingComplete, setLoadingComplete] = useState(false) return ( <div className=""> <LoadingOverlay onComplete={() => setLoadingComplete(true)}> <section className="page-header p-4"> <h1 className="text-9xl font-bold text-center">Hey</h1> </section> <main className="p-4"> <div className="max-w-4xl mx-auto"> <p className="text-lg text-primary/60 text-center"> Welcome to your app! The loading animation is complete. </p> </div> </main> </LoadingOverlay> </div> ) }