Spinner

A loading indicator that displays a circular spinning animation.

Anatomy

<script>
  import { Spinner } from "@saas-ui/svelte/components/spinner";
</script>

<Spinner />

Examples

Animation Duration Accessibility

Use the animationDuration prop to control the rotation speed of the spinner animation.

Basic Accessibility

Basic spinner with default styling.

Border Width Accessibility

Use the borderWidth prop to adjust the stroke width of the spinner ring.

Colours Accessibility

Use the colour prop to change the colour of the spinner.

Sizes Accessibility

Use the size prop to change the size of the spinner.

Track Colour Accessibility

Use the trackColour prop to change the colour of the spinner track (the non-spinning background).

With Label Accessibility

Combine spinner with text for a loading indicator.

Props

Prop Type Default Description
size xs | sm | md | lg | xl md The size of the spinner.
colour gray | red | orange | yellow | green | teal | blue | cyan | purple | pink | rose - The colour of the spinner.
label text Loading Accessible label for screen readers.
animationDuration text 0.5s The animation duration.
borderWidth text 2px The border width (thickness) of the spinner.
trackColour gray | red | orange | yellow | green | teal | blue | cyan | purple | pink | rose - The track colour palette of the spinner.
class text - CSS class to apply to the component.