Skip to content

Instantly share code, notes, and snippets.

@sirius0486
Created November 4, 2024 06:00
Show Gist options
  • Save sirius0486/f6171ce3dcafd3007fd38bdf39ea2e1a to your computer and use it in GitHub Desktop.
Save sirius0486/f6171ce3dcafd3007fd38bdf39ea2e1a to your computer and use it in GitHub Desktop.
loading.tsx
import { Loader2 } from "lucide-react"
import { Card, CardContent } from "@/components/ui/card"
export default function Loading() {
return (
<div className="absolute inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm">
<Card className="w-[300px]">
<CardContent className="flex flex-col items-center justify-center p-6">
<Loader2 className="h-10 w-10 animate-spin text-primary" />
<p className="mt-4 text-lg font-semibold text-primary">Loading...</p>
</CardContent>
</Card>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment