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)
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
Properties | Description | Type | Default |
---|
animated | Whether display the skeleton placeholders loading | Boolean | false |
Skeleton.Paragraph
Properties | Description | Type | Default |
---|
animated | Whether display the skeleton placeholders loading | Boolean | false |
lineCount | The number of paragraph lines | number | 3 |