Install via shadcn:
npx shadcn@latest add https://carlosgalarza.com/ui/shimmer.jsonPreview:
import { Shimmer } from "@/components/ui/shimmer";
export default function MyComponent() {
return (
<Shimmer>Loading content...</Shimmer>
);
}Preview:
Custom timing shimmer!import { Shimmer } from "@/components/ui/shimmer";
export default function CustomTimingExample() {
return (
<Shimmer asChild shimmerDuration={2}>
<span>Custom timing shimmer!</span>
</Shimmer>
);
}Preview:
Custom teal shimmer!import { Shimmer } from "@/components/ui/shimmer";
export default function TealShimmerExample() {
return (
<Shimmer
asChild
shimmerDuration={1.5}
className="[--shimmer-base:theme(colors.teal.800)] [--shimmer-highlight:theme(colors.teal.200)]"
>
<span>Custom teal shimmer!</span>
</Shimmer>
);
}