Skeleton
Holds the place of content that is still on its way, so the page does not jump when it arrives.
Examples
Largest funds
- Net assets
- Expense ratio
- Holdings
Usage
Use it when
- The text's shape is known and the answer takes longer than the slow-wait delay, so the bars promise what arrives.
- A picture, a chart or an avatar has a known size, and a block holds its place.
- A
Suspenseboundary waits on a module whose rendered size is known.
Use something else when
- The wait may be under 250ms. Use useSlowWait instead, which keeps the previous content until the wait is worth admitting to.
- The content is already on screen and a reload, a page turn or a filter replaces it. Use ListBody instead, which keeps it on screen, dimmed, until the answer lands.
- The answer is known to be none. Use Empty instead.
- A control is waiting on its own action. Use StateButton instead.
- The shape of the answer is not known. Use Spinner instead.
Rules
General
Avoid
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/skeleton.jsonimport { Skeleton } from "@/components/cobalt/ui/skeleton"