Skeleton

A placeholder that previews the shape of content being loaded.

Live preview
Interact with the component to see results here.
View code
HTML
<sy-skeleton
  type="text"
  rows="3"
  width="100%"
  id="sample"
></sy-skeleton>

Usage guide

#

While content loads, preserve the final layout's structure and space. Switch to Empty if loading finishes without data.

Text, profiles, and images

Choose a type resembling the content: text, avatar, image, or gallery.

Buttons, tables, and trees

Use button, table, or tree for complex areas and adjust rows and width.

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 · Disabled

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Rows

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Type

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Property · Width

See how settings change appearance and behavior.

View code
HTML
Loading the example.

Methods · Stop & Reset Animation

Use the example's buttons to call methods and inspect their results.

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-skeleton>

Properties

Attribute / PropertyTypeDefaultDescription
'text' | 'avatar' | 'image' | 'gallary' | 'gallery' | 'button' | 'table' | 'tree''text'Placeholder shape matching the actual content.
number0Number of rows in repeated content such as text, tables, or trees.
string'100%'Label area width, as a CSS length.
booleanfalseKeep the Skeleton visible while stopping only its animation.

Methods

MethodReturnsDescription
Promise<void>Stop the Skeleton animation.
Promise<void>Restart the Skeleton animation.