Spinner

Share via

Use the spinner shortcode to indicate the loading state of a component or page.

Overview

Use the spinner shortcode to indicate the loading state of a component or page. The inner content is used as alternative description. As an example, the following shortcode displays a centered spinner.

Loading...
markdown
{{< spinner color="info" class="text-center" >}}
Loading...
{{< /spinner >}}

Arguments

The shortcode supports the following arguments:

ArgumentRequiredDescription
colorNoOptional theme color of the spinner, either “primary” (default), “secondary”, “success”, “danger”, “warning”, “info”, “light”, “dark”, “white” or “black”.
growNoOptional flag to indicate the spinner is growing instead of rotating, defaults to false.
classNoOptional class attribute of the spinner wrapping element, e.g. “text-center”.

Examples

Change the style of your spinner with shortcode arguments.

Colored spinner

Set the color argument to apply a theme color to the spinner. The following shortcodes display a centered spinner for each available color.

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
markdown
{{< spinner color="primary" >}}Loading...{{< /spinner >}}
{{< spinner color="secondary" >}}Loading...{{< /spinner >}}
{{< spinner color="success" >}}Loading...{{< /spinner >}}
{{< spinner color="danger" >}}Loading...{{< /spinner >}}
{{< spinner color="warning" >}}Loading...{{< /spinner >}}
{{< spinner color="info" >}}Loading...{{< /spinner >}}
{{< spinner color="light" >}}Loading...{{< /spinner >}}
{{< spinner color="dark" >}}Loading...{{< /spinner >}}
{{< spinner color="white" >}}Loading...{{< /spinner >}}
{{< spinner color="black" >}}Loading...{{< /spinner >}}

Growing spinner

Set grow to true to show a growing spinner.

Loading...
markdown
{{< spinner grow="true" color="info" class="text-center" >}}
Loading...
{{< /spinner >}}