logoAnt Design

⌘ K
  • Design
  • Development
  • Components
  • Blog
  • Resources
5.25.0
  • Components Overview
  • General
    • Button
    • FloatButton
      5.0.0
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
      5.10.0
    • Grid
    • Layout
    • Space
    • Splitter
      5.21.0
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
    • Tabs
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPicker
      5.5.0
    • DatePicker
    • Form
    • Input
    • InputNumber
    • Mentions
    • Radio
    • Rate
    • Select
    • Slider
    • Switch
    • TimePicker
    • Transfer
    • TreeSelect
    • Upload
  • Data Display
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Collapse
    • Descriptions
    • Empty
    • Image
    • List
    • Popover
    • QRCode
      5.1.0
    • Segmented
    • Statistic
    • Table
    • Tag
    • Timeline
    • Tooltip
    • Tour
      5.0.0
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
      5.1.0
  • Other
    • Affix
    • App
      5.1.0
    • ConfigProvider
    • Util
      5.13.0

Skeleton

Provide a placeholder while you wait for content to load, or to visualize content that doesn't exist yet.
Importimport { Skeleton } from "antd";
Sourcecomponents/skeleton
Docs
Edit this pageChangelog

Resources

Ant Design X
Ant Design Charts
Ant Design Pro
Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Web3
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
Twitter
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference

Help

GitHub
Change Log
FAQ
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

When To Use

  • When a resource needs long time to load.
  • When the component contains lots of information, such as List or Card.
  • Only works when loading data for the first time.
  • Could be replaced by Spin in any situation, but can provide a better user experience.

Examples

API

Common props ref:Common props

Skeleton

PropertyDescriptionTypeDefault
activeShow animation effectbooleanfalse
avatarShow avatar placeholderboolean | SkeletonAvatarPropsfalse
loadingDisplay the skeleton when trueboolean-
paragraphShow paragraph placeholderboolean | SkeletonParagraphPropstrue
roundShow paragraph and title radius when truebooleanfalse
titleShow title placeholderboolean | SkeletonTitlePropstrue

SkeletonAvatarProps

PropertyDescriptionTypeDefault
activeShow animation effect, only valid when used avatar independentlybooleanfalse
shapeSet the shape of avatarcircle | square-
sizeSet the size of avatarnumber | large | small | default-

SkeletonTitleProps

PropertyDescriptionTypeDefault
widthSet the width of titlenumber | string-

SkeletonParagraphProps

PropertyDescriptionTypeDefault
rowsSet the row count of paragraphnumber-
widthSet the width of paragraph. When width is an Array, it can set the width of each row. Otherwise only set the last row widthnumber | string | Array<number | string>-

SkeletonButtonProps

PropertyDescriptionTypeDefaultVersion
activeShow animation effectbooleanfalse
blockOption to fit button width to its parent widthbooleanfalse4.17.0
shapeSet the shape of buttoncircle | round | square | default-
sizeSet the size of buttonlarge | small | default-

SkeletonInputProps

PropertyDescriptionTypeDefault
activeShow animation effectbooleanfalse
sizeSet the size of inputlarge | small | default-

Design Token

Component TokenHow to use?
Token NameDescriptionTypeDefault Value
blockRadiusBorder radius of skeletonnumber4
gradientFromColorStart color of gradientstringrgba(0,0,0,0.06)
gradientToColorEnd color of gradientstringrgba(0,0,0,0.15)
paragraphLiHeightLine height of paragraph skeletonnumber16
paragraphMarginTopMargin top of paragraph skeletonnumber28
titleHeightHeight of title skeletonstring | number16
Global TokenHow to use?
Basic

Simplest Skeleton usage.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Complex combination

Complex combination with avatar and multiple paragraphs.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Active Animation

Display active animation.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Button/Avatar/Input/Image/Node

Skeleton Button, Avatar, Input, Image and Node.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
Contains sub component

Skeleton contains sub component.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code
List

Use skeleton in list component.

CodeSandbox Icon
codepen icon
External Link Icon
expand codeexpand code

Image placeholder

Ant Design, a design language

We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently.