# VS Modules / Skeleton Automatic loading shapes measured from the site's real components. Copy Skeleton.tsx into the host project and adapt it to the existing framework and design system. It contains the complete measurement, theme, animation and reveal implementation used by the playground. The React reference only imports React; no loading library, stylesheet package or VisualSystem package is required. Place SkeletonProvider around a site or separately themed region. Wrap each independently loading region with Skeleton. Connect loading to the existing query/router lifecycle; the provider does not discover requests. Keep navigation and usable controls outside pending regions. Never add the playground's artificial loading delay to production. Use {value => }. Null or undefined data means pending; false, zero and empty strings are valid data. Use safe representative fixtures for first-load samples. Plain children work with loading={pending}. Samples must render synchronously; do not fetch or suspend inside a sample. Skeleton measures text line boxes, media, controls and painted leaves using native DOM geometry. Resize and mutation observers, image load events and font readiness update shapes only while loading. Coordinates account for scaled containers. Keep media dimensions and the host's typography intact. Reserve dimensions when stable geometry matters: different final text, list counts or aspect ratios can still reflow. Before measurement or without sample content, a generic block fills the reserved region. Canvas, shadow roots and embeds need a sized data-skeleton-block element; data-skeleton-ignore omits an element and its descendants. Pseudo-element artwork is not measured. Provider defaults: mode="system", reveal="sweep", theme={{ radius: '2px', animation: 'shimmer', speed: 'slow' }}. Shimmer and sweep reveal travel at 45° from top-left to bottom-right; shimmer is one band crossing every shape in the boundary together. Animation supports shimmer/pulse/none; speed supports slow/fast and affects only loading motion. Use reveal="fade" or reveal={{ order: 'together', duration: 360, hold: 0 }} for a coordinated fade. Reveal uses the Web Animations API and settles immediately when unsupported or reduced motion is requested. Reduced motion also disables shimmer and pulse. Theme light/dark base and highlight accept host color tokens. Pass mode="light" or mode="dark" from the application's resolved theme; system follows OS preference. Variables resolve locally per boundary, so nested regions remain independent. Default dark shapes use an 8% white base and 4% white highlight; light shapes use a 7% black base. The preview uses the same defaults. Keep colors and radius as code-level options, with no extra timing or color panels. Loading samples are inert and aria-hidden; boundaries expose aria-busy and a named status. The same child subtree stays mounted through reloads and settings changes, preserving local state when its type/key remains stable. Pass confirmed data without forcing loading during background refresh. A missing first-load sample cannot preserve a subtree that has not rendered yet. Geometry and samples are never persisted or sent anywhere. Pass error={} for failures or empty plus emptyMessage={} for successful empty results. Both settle the boundary. Keep fetching, cancellation, retry and errors in their existing owners. SkeletonSuspense accepts skeleton={} as the loading fallback; React owns the switch to resolved children, so that fallback does not animate across a Suspense replacement. Next.js render-function boundaries belong in client components; route loading.tsx may render a sample-based boundary. Under CSP, pass nonce to SkeletonProvider for its static stylesheet. Measurement uses no injected scripts or HTML strings. Dynamic geometry uses element style properties; verify the host policy allows those operations without weakening it. For Vue, Svelte or plain JavaScript, port the local measurement and lifecycle logic to that stack instead of adding React or another loading library. Playground controls, samples, fitted gallery and Reload timer are not integration requirements. VisualSystem Modules are custom, locally owned implementations. Use the supplied source for all module UI and effects; do not install an npm effect package, substitute another library, or direct users to a reference project. Research references are for study only. Adapt to the host framework without adding React or another framework. Existing QR, PDF and Apple Wallet format libraries are allowed only for encoding and file generation. Preserve required artwork and font license notices. Example: https://visual.systems/api/modules/skeleton/example.tsx