Fulldev UI

An animated loading indicator.

Processing payment...
$100.00

Installation

npx shadcn@latest add @fulldev/spinner

Usage

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

Spinner renders the Lucide loader-circle icon with role="status" and aria-label="Loading". Next to visible loading text, the text can carry the main status message.

Customization

Replace the default icon by editing spinner.astro.

---
import type { HTMLAttributes } from "astro/types"
import LoaderIcon from "@lucide/astro/icons/loader"

import { cn } from "@/lib/utils"

type Props = HTMLAttributes<"svg">

const { class: className, ...props } = Astro.props
---

<LoaderIcon
  data-slot="spinner"
  role="status"
  aria-label="Loading"
  class={cn("size-4 animate-spin", className)}
  {...props}
/>

Size

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

Button

Place the Spinner before the label with data-icon="inline-start", or after it with data-icon="inline-end".

Badge

Place the Spinner before the label with data-icon="inline-start", or after it with data-icon="inline-end".

Syncing Updating Processing

Input Group

Validating...

Empty

Processing your request
Please wait while we process your request. Do not refresh the page.

RTL

Set dir="rtl" on a parent element.

جاري معالجة الدفع...
١٠٠.٠٠ دولار

API Reference

Source: src/components/ui/spinner

Spinner accepts all SVG attributes plus the Lucide icon props color, size, stroke-width and absoluteStrokeWidth.