Loading Skeletons
Architecture pattern for loading states and skeleton components
Overview
Danvas uses granular Suspense boundaries and design-system skeleton primitives to keep page shells responsive while data loads. This page is the published developer view.
Canonical source: Loading Skeleton Engineering Standard. The repository standard owns the complete implementation recipe and review policy.
Recommended pattern
- Use route-level
loading.tsxfor a whole-route transition when replacing the full page is appropriate. - Use granular React
<Suspense>boundaries when menus, headers, actions, or other shell controls should remain interactive. - Keep each data component's fallback in a separate colocated skeleton file.
- Use primitives from
@repo/design-system/components/ui/skeletoninstead of hand-built placeholders with magic dimensions.
Available primitives
The design system exports SkeletonText, SkeletonAvatar, SkeletonButton, and SkeletonBadge. Check the canonical standard and the component source for current props and dimensions.
Implementation
Follow the canonical engineering standard for the Suspense, Server Component, and skeleton examples.