81 Pro components and page blocks

Get Pro

Skeleton

New

Preview

Customize

Shimmer2.2s
Reveal0.50s
Radius6px

Installation

npx shadcn@latest add https://uibrik.com/r/skeleton.json
Adds the files to components/uibrik/skeleton and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/skeleton.

Usage

import { Skeleton } from "@/components/uibrik/skeleton/skeleton";​<Skeleton  loading  shimmerDuration={2.2}  reveal={0.5}  radius={6}  // data-skeleton={…}  // data-skeleton-ignore={…}>  <ProfileCard user={user} /></Skeleton>

Props

Skeleton
loading
Type boolean
true
Show the skeleton. Turning it off plays the reveal.
shimmerDuration
Type number
2.2
One sweep across the content. 0 turns the shimmer off.
reveal
Type number
0.5
How long the reveal takes from top to bottom.
radius
Type number
6
Corner radius of the text bars. Boxes keep their element's own radius.
childrenrequired
Type ReactNode
–
The real content, with placeholder data while it loads. Its layout is what gets measured.
data-skeleton
Type attribute
–
On any element inside: draw it as one box (avatars, charts).
data-skeleton-ignore
Type attribute
–
On any element inside: leave it out of the skeleton.
className / style
Type string / CSSProperties
–
For the content box, so layout classes work as if Skeleton weren't there.