Spinner
A compact loading indicator for pending UI states.
Playground
Installation
Install in any React + Tailwind project:
$npx shadcn@latest add https://twigs.globirdenergy.com.au/r/spinner.json
Source
The exact source file used by this page, preferring the Twigs registry file when one exists and falling back to the current shadcn-generated primitive.
import { Loader2Icon } from "lucide-react"
import { cn } from "@/lib/utils"
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
return (
<Loader2Icon
role="status"
aria-label="Loading"
className={cn("size-4 animate-spin", className)}
{...props}
/>
)
}
export { Spinner }