Loading dashboard...
Loading dashboard...
import { Spinner } from "@/components/ui/spinner"<Spinner />You can replace the default spinner icon with any other icon by editing the Spinner component.
import { LoaderIcon } from "lucide-react"
import { cn } from "@/lib/utils"
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
return (
<LoaderIcon
role="status"
aria-label="Loading"
className={cn("size-4 animate-spin", className)}
{...props}
/>
)
}
export { Spinner }Use the size-* utility class to change the size of the spinner.
Add a spinner to a button to indicate a loading state. Remember to use the data-icon="inline-start" prop to add the spinner to the start of the button and the data-icon="inline-end" prop to add the spinner to the end of the button.
Add a spinner to a badge to indicate a loading state. Remember to use the data-icon="inline-start" prop to add the spinner to the start of the badge and the data-icon="inline-end" prop to add the spinner to the end of the badge.
import {
Item,
ItemContent,import { LoaderIcon } from "lucide-react"
import { cn } from "@/lib/utils"import { Spinner } from "@/components/ui/spinner"
export function SpinnerSize() {import { Badge } from "@/components/ui/badge"
import { Spinner } from "@/components/ui/spinner"
import {
InputGroup,
InputGroupAddon,import { Button } from "@/components/ui/button"
import {
Empty,import { Button } from "@/components/ui/button"
import { Spinner } from "@/components/ui/spinner"