Spinner

Communicate an ongoing task with a spinner and a short message.

Live preview
Interact with the component to see results here.
View code
HTML
<div
  style="position:relative;min-height:160px;border:1px solid rgba(103,80,164,.15)"
>
  <sy-spinner
    description="Loading"
    size="medium"
    delay="0"
  ></sy-spinner>
</div>

Usage guide

#

Represent short tasks or waiting with unknown progress. Consider Skeleton when the expected content structure is known.

  1. Reserve a loading area

    Place it in a container with a defined height. inline also shows a backdrop mask over that area.

  2. Avoid flicker for short tasks

    Set a delay in milliseconds with delay.

  3. Clear it when finished

    When the task ends, set hidden = true or remove the element.

Feature examples

#

Choose a feature from 6 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.

Usage examples · Overview

Try the selected example. Topics with multiple configurations let you switch between detailed examples.

View code
HTML
Loading the example.

Property · Delay

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Description

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Hidden

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Inline

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Size

See how settings change appearance and behavior.

View code
HTML
Loading the example.

API reference

#

Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.

<sy-spinner>

Properties

Attribute / PropertyTypeDefaultDescription
number0Delay before showing, in milliseconds.
string''Accessible help text accompanying the loading indicator.
booleanfalseHide the component.
booleanfalseApply a backdrop mask to the parent area.
'small' | 'medium' | 'large' | 'xlarge''medium'Component size.

Slots

SlotDescription
Component body or child items.