Flutter docs
Default skin

Skeleton

Provide a placeholder while you wait for content to load, or to visualize content that doesn't exist yet.

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

Skeleton, Skeleton.Avatar, Skeleton.Button, Skeleton.Input, Skeleton.Image, and Skeleton.Node are exported from @ceebee/ui/client.

Skeleton

PropertyDescriptionTypeDefaultVersion
activeShow animation effectbooleanfalse—
avatarShow avatar placeholderboolean | SkeletonAvatarfalse—
loadingDisplay the skeleton when trueboolean-—
paragraphShow paragraph placeholderboolean | SkeletonParagraphPropstrue—
roundShow paragraph and title radius when truebooleanfalse—
titleShow title placeholderboolean | SkeletonTitlePropstrue—
widthSet the width of titlenumber | string-—
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

PropertyDescriptionTypeDefaultVersion
activeShow animation effect, only valid when used avatar independentlybooleanfalse—
shapeSet the shape of avatarcircle | squarecircle—
sizeSet the size of avatarnumber | large | medium | smallmedium—

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 | medium | smallmedium—

Skeleton.Input

PropertyDescriptionTypeDefaultVersion
activeShow animation effectbooleanfalse—
sizeSet the size of inputlarge | medium | smallmedium—