FeedbackAvailable

Spinner

An indeterminate loading indicator paired with status text.

Loading example…

Installation

Add the component and its dependencies from the registry running on your computer.

terminal
npx shadcn@latest add https://brutallab.facilito.dev/r/spinner.json

Usage

Import the component into your project and keep the source code under your control.

tsx
'use client';

import { Spinner } from '@/components/ui/spinner';

export default function Demo() {
  return (
    <output className="flex items-center gap-3">
      <Spinner aria-hidden="true" />
      <span className="bl-type-label">Loading components…</span>
    </output>
  );
}

States & interaction

Appearance, behavior and keyboard checks.

  • Distinguish loading, progress, success, error and empty data as appropriate. Keep messages understandable without color.
  • The indicator needs no hover. Only actions and dismiss controls receive focus. Respect reduced motion.

API Reference

BrutalLab-specific properties. Native attributes are supported as well.

PropTypeDefaultDescription
string?Extends the root visual styles without changing its semantics.
ReactNode?Compose the exported subcomponents as shown in the runnable example.

Accessibility

Rules that should remain intact when adapting the component to a product.

Announce one useful status message; hide the decorative spinner when the text already names the state.

Retain keyboard focus styles and test the composition with keyboard navigation.

Use className for visual customization; preserve the primitive ARIA attributes.