SkeletonCard
A card that is loading: the title, the lines and the meta, in the card's own box.
import { SkeletonCard } from '@sypnia/ui/react'
A card and its skeleton
Code
import { Card, SkeletonCard } from '@sypnia/ui/react';
// The card and its skeleton side by side.
export default function Cards() {
return (
<div className="sy-grid">
<Card title="shop" meta="Frankfurt · 4 tables">The database of the online store.</Card>
<SkeletonCard />
</div>
);
} When to use it
Use it when
- Grids of cards whose content comes from the server.
Do not use it when
- Different shapes from the real card: nothing should jump when it arrives.
For everyone
- It is hidden from screen readers.
Props
| SkeletonCard | Type | Default |
|---|---|---|
lines | number | |
meta | boolean |