Skip to content

KSkeleton ​

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

Install ​

bash
pnpm add @ikun-ui/skeleton
bash
yarn add @ikun-ui/skeleton
bash
npm install @ikun-ui/skeleton

Basic usage ​

Simplest Skeleton usage.

Complex Combination ​

Complex combination with avatar and multiple paragraphs.

Active ​

Display active animation.

Skeleton Button, Avatar, Input, Image ​

Support some subcomponent skeletons

Custom Skeleton ​

You can customize the skeleton content through slots

Skeleton Props ​

NameTypeDefaultDescription
loadingbooleanfalseDisplay the skeleton when true.
sizesm | md | lg'md'Set the size of skeleton.
activebooleanfalseShow animation effect.
roundbooleanfalseShow paragraph and title radius when true.
titleboolean | KSkeletonTitlePropstrueShow title placeholder.
paragraphboolean | KSkeletonTitlePropstrueShow paragraph placeholder.
avatarboolean | KSkeletonTitlePropsfalseShow avatar placeholder.
clsstring''Additional class for component
attrsany{}Additional attributes

Skeleton Slots ​

NameDescription
defaultContent of the skeleton.
skeletonCustom rendering of skeleton content.

Skeleton Title Props ​

NameTypeDefaultDescription
widthnumber | string50%Set the width of skeleton title.
sizesm | md | lg'md'Set the size of skeleton title.
activebooleanfalseShow animation effect.
roundbooleanfalseShow title radius when true.
clsstring''Additional class for component
attrsany{}Additional attributes

Skeleton Paragraph Props ​

NameTypeDefaultDescription
widthnumber | string | Array<number | string>-Set the width of paragraph. When width is an Array, it can set the width of each row. Otherwise only set the last row width.
rowsnumber3Set the row count of paragraph.
sizesm | md | lg'md'Set the size of paragraph title.
activebooleanfalseShow animation effect.
roundbooleanfalseShow paragraph radius when true.
clsstring''Additional class for component
attrsany{}Additional attributes

Skeleton Avatar Props ​

NameTypeDefaultDescription
shapecircle | round | squarecircleSet the shape of skeleton avatar.
sizesm | md | lg'md'Set the size of skeleton avatar.
activebooleanfalseShow animation effect.
clsstring''Additional class for component
attrsany{}Additional attributes

Skeleton Button Props ​

NameTypeDefaultDescription
shapecircle | round | squareroundSet the shape of skeleton button.
sizesm | md | lg'md'Set the size of skeleton button.
activebooleanfalseShow animation effect.
blockbooleanfalseOption to fit button width to its parent width.
clsstring''Additional class for component
attrsany{}Additional attributes

Skeleton Input Props ​

NameTypeDefaultDescription
sizesm | md | lg'md'Set the size of skeleton input.
activebooleanfalseShow animation effect.
blockbooleanfalseOption to fit input width to its parent width.
clsstring''Additional class for component
attrsany{}Additional attributes

Skeleton Image Props ​

NameTypeDefaultDescription
activebooleanfalseShow animation effect.
clsstring''Additional class for component
attrsany{}Additional attributes

Skeleton Image Slots ​

NameDescription
defaultContent of the skeleton image.

MIT Licensed