Spinner
Live preview from the library's source
Install
From shadcn/ui
npx shadcn@latest add https://ui.shadcn.com/r/styles/new-york-v4/spinner.jsonFrom this collection
npx shadcn@latest add https://allcomps.vercel.app/r/ui-shadcn--spinner.jsonCode
import { cn } from "cn"
import { Loader2Icon } from "lucide-react"
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
return (
<Loader2Icon
role="status"
aria-label="Loading"
className={cn("size-4 animate-spin", className)}
{...props}
/>
)
}
export { Spinner }
Other loaders & skeletons
The same kind of component from the other libraries in the collection.