logoAnt Design

⌘ K
  • Design
  • Development
  • Components
  • Blog
  • Resources
6.0.0-alpha.3
  • Components Overview
  • Changelog
    v6.0.0-alpha.3
  • General
    • Button
    • FloatButton
      5.0.0
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
      5.10.0
    • Grid
    • Layout
    • Masonry
      6.0.0
    • 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
      DEPRECATED
    • 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
When To Use
Examples
Basic
Complex combination
Active Animation
Button/Avatar/Input/Image/Node
Contains sub component
List
Custom semantic dom styling
API
Common API
Skeleton
Skeleton.Avatar
Skeleton.Button
Skeleton.Input
Semantic DOM
Skeleton
Skeleton.Element
Design Token

Skeleton

Provide a placeholder while you wait for content to load, or to visualize content that doesn't exist yet.
Importimport { Skeleton } from "antd";
GitHub
components/skeletonIssueOpen issues
Docs
Edit this page
contributors
ResultSpin

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
X
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
WeaveFox logoWeaveFox-AI Development with WeaveFox 🦊
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

Common API

The following APIs are shared by Skeleton, Avatar, Button, Input, Image, Node.
PropertyDescriptionTypeDefaultVersion
activeShow animation effectbooleanfalse
classNamesCustomize class for each semantic structure inside the Skeleton component. Supports object or function.Record<SemanticDOM, string> | (info: { props }) => Record<SemanticDOM, string>-6.0.0
stylesCustomize inline style for each semantic structure inside the Skeleton component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props }) => Record<SemanticDOM, CSSProperties>-6.0.0

Skeleton

PropertyDescriptionTypeDefaultVersion
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

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

Skeleton.Avatar

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

Skeleton.Button

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-

Skeleton.Input

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

Semantic DOM

Skeleton

Skeleton.Element

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
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Complex combination

Complex combination with avatar and multiple paragraphs.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Active Animation

Display active animation.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Button/Avatar/Input/Image/Node

Skeleton Button, Avatar, Input, Image and Node.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Contains sub component

Skeleton contains sub component.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
List

Use skeleton in list component.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Custom semantic dom styling

You can customize the semantic dom style of Skeleton by passing objects or functions through classNames and styles.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
6.0.0

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.

  • root
    6.0.0
    Root element with table display, width, animation effects, border radius and other skeleton container basic styles
  • header
    6.0.0
    Header element with table cell, padding, vertical alignment and other avatar placeholder area layout styles
  • section
    6.0.0
    Section element with skeleton content area layout styles
  • avatar
    6.0.0
    Avatar element with inline-block display, vertical alignment, background color, size, border radius and other avatar placeholder styles
  • title
    6.0.0
    Title element with width, height, background color, border radius and other title placeholder styles
  • paragraph
    6.0.0
    Paragraph element with padding, list item styles, background color, border radius and other paragraph placeholder styles
Preview
  • root
    6.0.0
    Root element
  • content
    6.0.0
    Content element