Spinner

An animated loading indicator built from a spinning icon. Resize and recolor it with utility classes.

Source Tailwind CSS

Processing payment...
$100.00

Installation

templui add spinner

Customization

Examples

Size

Button

Badge

Syncing Updating Processing

Input Group

Validating...

Empty

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

API Reference

Required parameter
Hover for description

Spinner

Renders a spinning loader icon with an accessible status role.

Name Type Default
ID

Optional HTML id for the spinner element.

string
-
Class

Classes applied to the icon. Use size-* and text-* to resize and recolor.

string
size-4
Label

Accessible name announced to screen readers.

string
Loading
Icon

Optionally overrides the spinning icon (e.g. icon.Loader, icon.LoaderPinwheel).

func(...icon.Props) templ.Component
icon.LoaderCircle
Attributes

Additional HTML attributes for the wrapper element.

templ.Attributes
-