Skip to main content

Skeleton

Overview#

Allows you to display a loading state for several component types while your data is being fetched or computed.

Examples#

    <uxf-skeleton width="90%" variant="primary"></uxf-skeleton>    <uxf-skeleton width="60%" variant="warning"></uxf-skeleton>    <uxf-skeleton width="70%" variant="danger"></uxf-skeleton>

Types#

Supports various basic types, to represent various components in your project.

Text (default)#


Input#


Button#


Avatar#


Image#


    <uxf-skeleton></uxf-skeleton>    <uxf-skeleton type="input" width="50%"></uxf-skeleton>    <uxf-skeleton type="button" width="30%"></uxf-skeleton>    <uxf-skeleton type="avatar" size="160px"></uxf-skeleton>    <uxf-skeleton type="image" width="300px" height="200px"></uxf-skeleton>

Card#

By combining multiple types of skeletons you can represent a loading state for a card component.


<uxf-card>  <uxf-skeleton type="image" variant="success" animation="wave" ></uxf-skeleton>  <uxf-card-body>    <uxf-card-body>      <uxf-skeleton variant="dark" width="50%"></uxf-skeleton>    </uxf-card-body>    <uxf-skeleton width="70%"></uxf-skeleton>    <uxf-skeleton width="90%"></uxf-skeleton>    <uxf-skeleton width="40%"></uxf-skeleton>  </uxf-card-body>  <uxf-card-footer>    <uxf-skeleton type="button" animation="wave"></uxf-skeleton>  </uxf-card-footer></uxf-card>

Animations#

Glow (default)#


Wave#


    <uxf-skeleton></uxf-skeleton>    <uxf-skeleton type="input" width="50%"></uxf-skeleton>    <uxf-skeleton type="button" width="30%"></uxf-skeleton>    <uxf-skeleton type="avatar" size="160px"></uxf-skeleton>    <uxf-skeleton type="image" width="300px" height="200px"></uxf-skeleton>

Colors#

    <uxf-skeleton variant="primary"></uxf-skeleton>    <uxf-skeleton variant="secondary"></uxf-skeleton>    <uxf-skeleton variant="success"></uxf-skeleton>    <uxf-skeleton variant="info"></uxf-skeleton>    <uxf-skeleton variant="warning"></uxf-skeleton>    <uxf-skeleton variant="danger"></uxf-skeleton>    <uxf-skeleton variant="dark"></uxf-skeleton>    <uxf-skeleton variant="light"></uxf-skeleton>

Image#

It utilizes a 16:9 aspect ratio by default, for a responsive sizing. You can overwrite this by applying aspect="none" and utilize the height and width props to set your own sizing.




    <uxf-skeleton type="image" aspect="21x9" width="80%"></uxf-skeleton>    <uxf-skeleton type="image" aspect="4x3" width="40%"></uxf-skeleton>    <uxf-skeleton type="image" height="200px" aspect="none"></uxf-skeleton>

Properties#

PropertyAttributeDescriptionTypeDefault
animationanimationstring"glow"
aspectaspectstring"16x9"
heightheightstringundefined
sizesizestring"200px"
typetypestring"text"
variantvariantstring"none"
widthwidthstring"100%"