Skeleton

Skeleton screen, generally used to display the loading state of the general structure of the page before the data has been loaded

<Skeleton.Title />
<Skeleton.Paragraph />

Example

Basic usage of Skeleton component.

Skeleton basic usage (without animation)
Custom Skeleton
Skeleton with animated effect (line count is 6)
import React from "react";
import { Skeleton, Divider } from "../../index";
import "./index.less";

// Example FC
const Example = () => (
  <>
    <Divider contentAlign="left">
      Skeleton basic usage (without animation)
    </Divider>
    <Skeleton.Title />
    <Skeleton.Paragraph />

    <Divider contentAlign="left">Custom Skeleton</Divider>
    <Skeleton animated className="skeleton-custom-example" />

    <Divider contentAlign="left">
      Skeleton with animated effect (line count is 6)
    </Divider>
    <Skeleton.Title animated />
    <Skeleton.Paragraph animated lineCount={6} />
  </>
);

export default Example;

API

Skeleton / Skeleton.Title

PropertiesDescriptionTypeDefault
animatedWhether display the skeleton placeholders loadingBooleanfalse

Skeleton.Paragraph

PropertiesDescriptionTypeDefault
animatedWhether display the skeleton placeholders loadingBooleanfalse
lineCountThe number of paragraph linesnumber3