Your next page is taking shape...

Opening Your Next Page…

Loading the guide and preparing its examples for you to explore. The page will appear here automatically when it’s ready, so you can keep this view open without refreshing.

Made for Preact. Built to be yours.

Status & Feedback

Skeleton

Skeleton placeholders indicate loading content structure. Explain what is happening, what changed and what someone can do next. Pair visual status with language that still makes sense without its color. Import it from @/components/kamod-ui/skeleton.

Source · Design reference · API reference · Theming · Styles


Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width

Installation

Import Skeleton from @/components/kamod-ui/skeleton.

Install PackagesTerminal
pnpm add @kamod-ch/ui

Copy an example with @kamod-ch/ui or the matching @kamod-ch/ui/… subpath. The code block switches between those two installs. Connect The Global Theme CSS and Tailwind Source Detection before your first render.

Usage

Build placeholders that mirror final UI structure (avatar, text, form, table) for a more polished loading experience.

Import SetupTypeScript
import { Skeleton } from "@kamod-ch/ui";

Choose a complete composition from the examples below; required child components and props vary by pattern.

Component Examples & Variants

Explore Skeleton in Different Contexts, from the starting pattern to the compositions below. Begin with Pulse Variant (Default), then compare the examples that match your content, state and layout. These are working patterns to adapt, not a list of interchangeable variant values: check the API Reference before using a prop or combining behaviors. Look at the surrounding labels, supporting text and spacing as well as the component itself.

Read the Result and Its Implementation Together. Use each showcase’s Code view to inspect imports and composition, or its Prompt view to prepare a setup or adaptation brief. Try the narrow preview and local theme controls before connecting real data, and use Reset to return an example to its initial state. Keep layout changes in class utilities where appropriate; follow the Component Styles Guide for hierarchy and the Theming Guide for shared surfaces and colors. The Accessibility Notes explain what to preserve when making those changes.

Pulse Variant (Default)

Represent Content that Is Genuinely Loading. Use the default pulse skeleton while a known content shape is loading. Match its dimensions to the expected result so the placeholder explains the reserved space without suggesting that real information is already available.

Match the approximate final dimensions, keep placeholders out of the meaningful reading order and provide a separate status message when users need to understand the pending operation.

src/components/SkeletonExample.tsx9 lines
import { Skeleton } from "@kamod-ch/ui";

export const Example = () => (
  <div class="w-full max-w-md space-y-3">
    <Skeleton class="h-4 w-[92%]" />
    <Skeleton class="h-4 w-[84%]" />
    <Skeleton class="h-4 w-[76%]" />
  </div>
);

Shimmer Variant

Use Movement Sparingly Across Large Surfaces. Choose the shimmer skeleton when a moving highlight fits the surrounding loading treatment. Apply it consistently to the anticipated content regions, keeping the final layout and reduced-motion experience in mind.

Keep the final layout's shape, respect reduced-motion needs and replace the placeholders with a clear error or empty state if the content cannot arrive.

Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width

Glass Variant

Check the Placeholder Against Its Actual Surface. Use the glass skeleton for a softer translucent placeholder on a suitable surface. Compare it in both themes so the reserved content remains visible without relying on a background treatment that disappears against the page.

Test both themes and avoid using visual subtlety to hide an indefinite wait; provide meaningful status and recovery outside the decorative shapes.

Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width

Avatar Skeleton

Reserve the Profile's Layout before Data Arrives. Combine a circular placeholder with short text lines for a profile that has not loaded yet. The circle reserves the avatar's area, while the lines suggest the position of the name and supporting identity information.

Keep their dimensions close to the final content and replace the entire loading state when the real profile or an explicit failure becomes available.

Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width

Text Skeleton

Suggest Paragraph Shape without Imitating Readable Content. Vary skeleton line widths to suggest a paragraph's shape rather than repeating identical full-width bars. Match the number and spacing of lines to the likely content, keeping the placeholder a useful approximation of the final region.

Match the expected number of lines conservatively, avoid exposing decorative bars as text to assistive technology and let the real content determine its natural height after loading.

Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width

Card Skeleton

Mirror the Card's Actual Information Hierarchy. Arrange avatar, heading, metadata and body placeholders in the same positions as the eventual card content. This lets the loading state preserve the card's hierarchy instead of replacing it with one undifferentiated block.

Avoid adding placeholder regions the finished card will not contain, and handle partial or failed data explicitly rather than leaving isolated animated fragments behind.

Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width

Form Skeleton

Avoid Making Loading Placeholders Look Editable. Reserve the positions of labels, inputs and actions with form-shaped skeletons while required data loads. The placeholders should resemble the layout without inviting typing into controls that are not yet ready to accept values.

Explain that the form is loading, preserve its surrounding context and only expose real controls when their initial values and required configuration are ready.

Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width

Table Skeleton

Keep Row and Column Geometry Stable. Use consistent row heights and column widths for a loading table. Preserving that structure helps readers recognize the expected result and reduces movement when the actual headers, values and row actions appear.

Preserve headers where useful, keep decorative cells out of the reading order and replace the loading body with a clear empty or error state when appropriate.

Interactive Live Preview
Try it. Make it yours.
Setting the scene...

Interactive preview

Live Preact example Local preview theme · Responsive styles follow the preview widthFull width
API reference

Props and Data

Configure Skeleton using the contracts below. Read the documented options alongside the Source Definitions to understand which values your application supplies and which details the component owns. Start with a prop or helper, then follow its type link to inspect the declaration without leaving the page.

Props, slots and variants for this component.

API reference
Your API, from source

Type cards are extracted from this checkout’s TypeScript source at build time. Props inherited through HTMLAttributes, Omit or variant helpers remain references in those declarations; their fields are not flattened here. Match the reference to your installed version, and check a package’s exports before writing an import type. A type exported by a source file is not necessarily re-exported by @kamod-ch/ui.

Component Props

Read each option with its owning component. The
marker identifies required fields verified in that declaration. A ? means a field can be omitted; it does not promise a fallback value. Existing documented defaults remain alongside the descriptions. For callbacks, check the argument and return types before connecting your own state or services.
@kamod-ch/ui/skeleton1.5 KB min · 0.6 KB gzipSignals: none

Skeleton

SkeletonProps

Skeleton documented props
Prop / typeDescription
class
string | SignalLike<string | undefined>SkeletonProps

Configure class for Skeleton. Compare its accepted type with the Usage Guidance before supplying a value.

Default
—
variant
"pulse" | "shimmer" | "glass"SkeletonProps

Configure variant for Skeleton. Compare its accepted type with the Usage Guidance before supplying a value.

Default
"pulse"

Data Type Reference

Expand a card to inspect and copy the exact declaration. The code header identifies its repository file; follow imported or inherited types in the Implementation Source when you need the complete dependency chain. Required-field summaries cover fields declared directly in that type. Source-only helpers and inferred schema outputs describe the local implementation, not additional props you can pass to every component.

Skeleton Props

1 declared field
SkeletonProps
Exported Source Declaration from Skeleton.tsx. Referenced types retain their original names; inspect that file for imports and supporting definitions. Inspect the Complete Definition of SkeletonProps before adapting it.

Accessibility

Skeleton is a visual placeholder, not a complete status or announcement mechanism. Its shapes reserve space while content loads, but they do not tell assistive technology what the missing content represents.

Take the Next Useful Step

You have the pieces. Put them into one real interaction, keep its state in one place, and check the result with the content your application will actually show.

Connect the Foundation

Return to Choose and Compose Components to connect this reference to a working screen. Keep global CSS in one entrypoint and import only the components that screen needs.

Build the Surrounding Screen

Find a neighboring interaction in the Component Library, or start with a complete Block. Replace sample content and destinations before refining the layout; a local class change can stay with the composition.

Make the Result Hold Up

Use shared theme roles for changes that belong everywhere. Then review the whole journey: keyboard focus, long labels, narrow screens and a clear way to recover when something fails.

Keep a link to the source and note your intentional changes. Your next edit should begin with a clear decision, not another search.