Loading component…
Loading component…
Skeleton blocks that share one soft light sweep, plus shimmering text for “Thinking…” states
To reuse this local React demo, copy all files from the Code tab into the same folder, then import ShimmerLoader from ./shimmer-loader.
import { Skeleton, ShimmerText } from "@/components/ui/shimmer-loader";
export function PostSkeleton() {
return (
<div aria-busy="true" className="flex items-center gap-3">
<Skeleton circle width={36} />
<div className="grid gap-2">
<Skeleton width={120} height={10} />
<Skeleton width={80} height={8} />
</div>
</div>
);
}
export function Thinking() {
return <ShimmerText>Generating summary…</ShimmerText>;
}| Name | Type | Default | Description |
|---|---|---|---|
| Skeleton · width | number \| string | "100%" | Width – numbers are px, strings any CSS length |
| Skeleton · height | number \| string | 12 | Height – numbers are px |
| Skeleton · radius | number \| string | 6 | Corner radius |
| Skeleton · circle | boolean | false | Round shape that uses width for both sides, e.g. for avatars |
| Skeleton · className / style | string / CSSProperties | Extra class or inline styles on the block | |
| ShimmerText · children | ReactNode | The label the highlight runs through | |
| ShimmerText · duration | number | 2 | Seconds for one pass of the highlight |
| ShimmerText · className | string | Extra class – font size and weight are inherited |
Skeletons fill their container by default; set width for fixed shapes
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
@import "tailwindcss"; in your main CSS file.