Skip to main content
Version: v9

ion-spinner

shadow

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.

Basic Usage

The default spinner is based on the mode. When the mode is ios the spinner will be "lines", and when the mode is md the spinner will be "circular". If the name property is set, then that spinner will be used instead of the mode specific spinner.

Theming

Colors

Styling

You may use custom CSS to style the spinner. For example, you can resize the spinner by setting the width and height.

CSS Custom Properties

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 | undefined
Defaultundefined

duration

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

mode

DescriptionThe mode determines the platform behaviors of the component.

This is a virtual property that is set once during initialization and will not update if you change its value after the initial render.
Attributemode
Type"ios" | "md"
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

size

DescriptionSet to "xsmall" for the smallest size. Set to "small" for a smaller size. Set to "medium" for a medium size. Set to "large" for a large size. Set to "xlarge" for the largest size.

Defaults to "xsmall" for the ionic theme, undefined for all other themes.
Attributesize
Type"large" | "medium" | "small" | "xlarge" | "xsmall" | undefined
Defaultundefined

theme

DescriptionThe theme determines the visual appearance of the component.

This is a virtual property that is set once during initialization and will not update if you change its value after the initial render.
Attributetheme
Type"ios" | "md" | "ionic"
Defaultundefined

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.