UI
Spinner
Display loading states in your Preswald application
The Spinner widget provides a visual loading indicator for your Preswald application. It’s useful for indicating that content is being loaded or that an operation is in progress.
Properties
Property | Type | Required | Default | Description |
---|---|---|---|---|
label | string | No | ’Loading…’ | Text displayed below the spinner |
variant | string | No | ’default’ | Visual style variant (‘default’ or ‘card’) |
className | string | No | ” | Additional CSS classes to apply to the spinner |
showLabel | boolean | No | true | Whether to show the loading text label |
Basic Usage
Examples
Default Spinner
Custom Label
Card Variant
The card variant wraps the spinner in a card container for better visual hierarchy.
Hidden Label
Custom Styling
Notes
- The spinner uses a clean, animated border design that’s visually appealing and lightweight
- The card variant is useful when you want to emphasize the loading state in your layout
- You can customize the appearance using the className property
- The spinner is centered by default and works well in both inline and block contexts