Skip to main content

Animate

Loading skeleton component for placeholder content during data fetching.

Basic Usage

import { Animate } from '@multinaire/ui';

<Animate height={40} />

Props

PropTypeDefaultDescription
flexnumberFlex grow value
marginSpacingPropsOuter margin
widthDimensionValue'100%'Fixed width of the skeleton
heightDimensionValueFixed height of the skeleton
borderRadiusBorderRadiusPropsCorner radius of the skeleton
backgroundColorColorKeysBackground color key from the active theme palette
styleViewStyleAdditional styles applied to the skeleton

Examples

Text Placeholder

<Animate width={200} height={20} borderRadius={4} />

Avatar Placeholder

<Animate width={48} height={48} borderRadius={24} />

Card Placeholder

<Animate width="100%" height={120} borderRadius={8} />

List Placeholders

<Container gap={12}>
{[1, 2, 3].map((i) => (
<Container key={i} horizontal gap={12} alignItems="center">
<Animate width={48} height={48} borderRadius={24} />
<Container flex={1} gap={8}>
<Animate height={16} borderRadius={4} />
<Animate width="60%" height={12} borderRadius={4} />
</Container>
</Container>
))}
</Container>

With Flex

<Container horizontal gap={8}>
<Animate flex={1} height={100} />
<Animate flex={1} height={100} />
</Container>