ttolbel UI

Component

Skeleton

A shimmering placeholder block with a randomized warm/cool tint and staggered timing per instance, so a screen full of skeletons never looks like it's blinking in lockstep.

The primitive

skeleton.tsx
<NativeSkeleton variant="text" lines={3} />

Example

Stands in for a list of avatar-plus-two-lines rows behind the shared loading-state wrapper, each one seeded by its row index so the shimmer never falls into a visible rhythm.

skeleton-example.tsx
{Array.from({ length: 3 }, (_, i) => (
  <div key={i} className="rounded-2xl border border-black/[0.04] bg-white/85 px-3 py-3">
    <div className="flex items-center gap-3">
      <NativeSkeleton variant="avatar" width={40} height={40} index={i * 10} />
      <div className="flex-1 flex flex-col gap-2">
        <NativeSkeleton height={14} width={`${60 + (i % 3) * 15}%`} index={i * 10 + 1} />
        <NativeSkeleton height={12} width={`${40 + (i % 2) * 20}%`} index={i * 10 + 2} />
      </div>
    </div>
  </div>
))}

Capabilities

PropTypeDescription
widthnumber | string
heightnumber | string
variant"text" | "rect" | "circle" | "avatar"
linesnumber
indexnumber
classNamestring