Skip to main content
Version: v6

ion-spinner

shadow

Contents

The Spinner component provides a variety of animated SVG spinners. Spinners are visual indicators that the app is loading content or performing another process that the user needs to wait on.

The default spinner to use is based on the platform. The default spinner for ios is "lines", and the default for android is "crescent". If the platform is not ios or android, the spinner will default to crescent. If the name property is set, then that spinner will be used instead of the platform specific spinner.

Usage

<!-- Default Spinner -->
<ion-spinner></ion-spinner>

<!-- Lines -->
<ion-spinner name="lines"></ion-spinner>

<!-- Lines Small -->
<ion-spinner name="lines-small"></ion-spinner>

<!-- Dots -->
<ion-spinner name="dots"></ion-spinner>

<!-- Bubbles -->
<ion-spinner name="bubbles"></ion-spinner>

<!-- Circles -->
<ion-spinner name="circles"></ion-spinner>

<!-- Crescent -->
<ion-spinner name="crescent"></ion-spinner>

<!-- Paused Default Spinner -->
<ion-spinner paused></ion-spinner>

Properties

color

DescriptionThe color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
Attributecolor
Type"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined
Defaultundefined

duration

DescriptionDuration of the spinner animation in milliseconds. The default varies based on the spinner.
Attributeduration
Typenumber | undefined
Defaultundefined

name

DescriptionThe name of the SVG spinner to use. If a name is not provided, the platform's default spinner will be used.
Attributename
Type"bubbles" | "circles" | "circular" | "crescent" | "dots" | "lines" | "lines-sharp" | "lines-sharp-small" | "lines-small" | undefined
Defaultundefined

paused

DescriptionIf true, the spinner's animation will be paused.
Attributepaused
Typeboolean
Defaultfalse

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

NameDescription
--colorColor of the spinner

Slots

No slots available for this component.

View Source