Spinner

A 12-bar circular loading indicator with staggered animation.

12 bars arranged in a circle, each fading in sequence so a highlight appears to travel around the ring. The animation is a scoped CSS keyframe inside the SVG — no global styles, no extra dependencies. Color defaults to currentColor, so text-* classes and the surrounding theme apply automatically.

Processing payment...
$100.00
import {
  Item,
  ItemContent,

Installation

pnpm dlx shadcn@latest add https://ui.tyap.me/r/styles/base/spinner.json

Usage

import { Spinner } from "@/components/ui/spinner"
<Spinner />
<Spinner size={24} />
<Spinner size={16} color="rgba(255,255,255,0.65)" />

Examples

Size

Pass size in pixels, or override with a size-* Tailwind class.

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

export function SpinnerSize() {

Button

Place <Spinner /> before the label with data-icon="inline-start" for a start position, or after with data-icon="inline-end" for an end position.

import { Button } from "@/components/ui/button"
import { Spinner } from "@/components/ui/spinner"

Badge

SyncingUpdatingProcessing
import { Badge } from "@/components/ui/badge"
import { Spinner } from "@/components/ui/spinner"

Input Group

Validating...
import { ArrowUpIcon } from "lucide-react"

import {

Empty

Processing your request
Please wait while we process your request. Do not refresh the page.
import { Button } from "@/components/ui/button"
import {
  Empty,

Props

In addition to the <svg> attributes, it accepts:

PropTypeDefaultDescription
sizenumber16The size of the spinner in pixels.
colorstring"currentColor"The color of the spinner bars.
classNamestring-Additional CSS classes.

RTL

To enable RTL support in shadcn/ui, see the RTL configuration guide.

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

import * as React from "react"