Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Spinner

A spinning loading indicator.

Installation

npx logic2b@next add spinner

Usage

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

<Spinner />
<Spinner className="size-6 text-primary" />

Usage notes

Renders lucide-react’s Loader2Icon with animate-spin; any prop accepted by an <svg> element (e.g. className for size/color) is passed through. It ships with role="status" and aria-label="Loading" so assistive technology announces it.

Examples

Sizes

In a button

Live playground

Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.

Generated JSX
<Spinner
  className="size-6"
  aria-label="Loading content"
 />

API reference

Generated from the public TypeScript exports in src/ui/spinner.tsx.

View JSON

Spinner

Component
Props: React.ComponentProps<"svg">

Accessibility contract

Machine-readable behavior and consumer responsibilities for spinner.

View JSON
Support
Authored behavior
Pattern
status
SVG role=status

Built-in semantics

  • Exposes role=status with a default Loading accessible name.

Consumer responsibilities

  • Replace the label when the loading operation needs more context.