Skeleton
Skeleton placeholders are temporary content layout previews.
import { component$ } from '@builder.io/qwik';
import { Skeleton } from '~/components/ui';
export default component$(() => {
return (
<div class="flex items-center space-x-4">
<Skeleton class="h-12 w-12 rounded-full" />
<div class="space-y-2">
<Skeleton class="h-4 w-[250px]" />
<Skeleton class="h-4 w-[200px]" />
</div>
</div>
);
});
Installation
Run the following cli command or copy/paste the component code into your project
Usage
Examples
Card
import { component$ } from '@builder.io/qwik';
import { Skeleton } from '~/components/ui';
export default component$(() => {
return (
<div class="flex flex-col space-y-3">
<Skeleton class="h-32 w-64 rounded-3xl" />
<div class="space-y-2">
<Skeleton class="h-4 w-64" />
<Skeleton class="h-4 w-48" />
</div>
</div>
);
});