Back to Shark UI

Spinner

docs/components/spinner

latest5.6 KB
Original Source

Sections

Components

Utilities

Forms

Hooks

Spinner

Copy Markdown

A spinner for displaying a loading state.

PreviewCode

Generating image...

78%

Installation#

CLIManual

pnpmbunnpmyarn

pnpm dlx shadcn@latest add @shark/spinner

Usage#

import { Spinner } from "@/components/ui/spinner";
<Spinner />

Customization#

Examples#

Size#

Use the size-* utility class to change the size of the spinner.

PreviewCode

Badge#

Add a spinner to a badge to indicate a loading state.

PreviewCode

DeletingGenerating

Input Group#

Use a spinner in an input group addon to indicate a loading or validating state.

PreviewCode

API Reference#

Spinner#

Use the Spinner component to display a loading indicator. It forwards SVG props and supports className for sizing and styling.

PropTypeDefault
classNamestring-
aria-labelstring"Loading"

[

Previous page

Slider ](/docs/components/slider)[

Next page

Status ](/docs/components/status)

On This Page

InstallationUsageCustomizationExamplesSizeBadgeInput GroupAPI ReferenceSpinner