Skeleton

Skeleton

import Skeleton from "@kiwicom/orbit-components/lib/Skeleton";
<Skeleton height={100} width={300} />
<Skeleton>
<rect x="48" y="8" rx="3" ry="3" width="88" height="6" />
<rect x="48" y="26" rx="3" ry="3" width="52" height="6" />
<rect x="0" y="56" rx="3" ry="3" width="410" height="6" />
</Skeleton>
<Skeleton rows={3} rowOffset={15} rowHeight={10} />
<Skeleton preset="Button" />

Props

NameTypeDefaultDescription
animatebooleantrueTurns animation on/off
childrenReact.ReactNodeCustom skeleton shapes
colorstringpaletteCloudDarkSets color for SVG rect elements from Orbit tokens
dataTeststringOptional prop for testing purposes
heightnumber \| string100%Sets height for SVG element
idstringSets id attribute for the Skeleton component
maxHeightnumber \| stringSets maximum height for SVG element
presetPresetPredefined skeleton layouts
rowBorderRadiusnumber3Sets border-radius for row rect elements
rowHeightnumber21pxSets height for rect elements
rowOffsetnumber20pxSets offset between rect elements
rowsnumberNumber of rect elements to display
spaceAfterenumAdditional margin-bottom after component
titlestringProvides text for screen readers
viewBoxstringSets viewBox attribute for SVG element
widthnumber \| string100%Width of SVG element

enum

spaceAfter
"none"
"smallest"
"small"
"normal"
"medium"
"large"
"largest"

Preset

Preset
"List"
"Image"
"Card"
"Button"
"Text"