Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

Skeleton

skeleton

Reserves content geometry with an animated loading placeholder.

Usage

Shape

shape supports text / circle / rect, and the size is controlled by className.

tsx
<div className="flex items-center gap-4">
  <Skeleton className="w-32" />
  <Skeleton shape="circle" className="size-10" />
  <Skeleton shape="rect" className="h-16 w-32" />
</div>

Avatar + Text line

Combine circles and text blocks to simulate user information loading placeholders.

tsx
<div className="flex items-center gap-3">
  <Skeleton shape="circle" className="size-10" />
  <div className="flex-1 space-y-2">
    <Skeleton className="w-24" />
    <Skeleton className="w-40" />
  </div>
</div>

List Preset

ListSkeleton Configure multiple rows of list placeholders in one row.

tsx
<ListSkeleton rows={3} />

Card Grid Presets

CardSkeleton Output card grid placeholder.

tsx
<CardSkeleton count={2} />

When to use

Use Skeleton to reserve content-shaped space while data loads. Use ListSkeleton, CardSkeleton, or TableSkeleton to avoid rebuilding common layouts. Use Empty only after loading completes without data; pair table presets with Table or ProTable.

Import

ts
import { Skeleton, TableSkeleton, CardSkeleton, ListSkeleton } from "@hulianui/ui"

Props

Skeleton inherits native div attributes except style and provides a CVA shape variant:

NameTypeDefaultDescription
shape"text" | "circle" | "rect""text"Placeholder shape.

ListSkeleton and CardSkeleton use rows and count, respectively; constrain preset dimensions with an outer className. All three presets accept an optional label override for the accessible loading message. Without one, they follow ConfigProvider and default to Chinese.

Pitfalls

  • Presets intentionally omit chrome. Do not add an unnecessary Card wrapper that creates duplicate borders.
  • The shimmer is a motion-driven backgroundPosition tween, not a CSS animation, so Tailwind variants such as motion-reduce: cannot reach it. The placeholder block itself stays static DOM, so headless screenshots show its shape without special handling.
  • Under prefers-reduced-motion: reduce the component falls back to a static block by itself (#350). The placeholder geometry stays, only the sweep and its gradient go away, and all three presets share the same primitive so they settle together. The library owns this preference; consumers need to do nothing.
  • Presets expose a localized runtime loading label to assistive technology.
  • Presets read the runtime locale from ConfigProvider, so they are client components; server components can still import and render them.

Related

Empty · Watermark · Table · Book3D · ProTable · PricingTable

Playground

<Skeleton shape="text" />
PreviousEmptyData DisplayNextWatermark

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Pitfalls
    • Related
  • Playground