Skip to content
GitHub11 stars

Use to show a placeholder while content is loading.

<div class="flex min-w-0 items-center gap-4">
    <Skeleton Class="h-12 w-12 shrink-0 rounded-full" />
    <div class="min-w-0 space-y-2">
        <Skeleton Class="h-4 w-[250px] max-w-full" />
        <Skeleton Class="h-4 w-[200px] max-w-full" />
    </div>
</div>

Installation

dnx Blazix.Cli add skeleton

Usage

<Skeleton Class="h-[20px] w-[100px] rounded-full" />

Avatar

<div class="flex w-fit items-center gap-4">
    <Skeleton Class="size-10 shrink-0 rounded-full" />
    <div class="grid gap-2">
        <Skeleton Class="h-4 w-[150px]" />
        <Skeleton Class="h-4 w-[100px]" />
    </div>
</div>

Card

<Card Class="w-full max-w-xs">
    <CardHeader>
        <Skeleton Class="h-4 w-2/3" />
        <Skeleton Class="h-4 w-1/2" />
    </CardHeader>
    <CardContent><Skeleton Class="aspect-video w-full" /></CardContent>
</Card>

Text

<div class="flex w-full max-w-xs flex-col gap-2">
    <Skeleton Class="h-4 w-full" />
    <Skeleton Class="h-4 w-full" />
    <Skeleton Class="h-4 w-3/4" />
</div>

Form

<div class="flex w-full max-w-xs flex-col gap-7">
    <div class="flex flex-col gap-3">
        <Skeleton Class="h-4 w-20" />

Table

<div class="flex w-full max-w-sm flex-col gap-2">
    @for (var index = 0; index < 5; index++)
    {

RTL

To enable RTL support in Blazix, see the RTL configuration guide.

Translated with AI for the demo, so it may have mistakes.

// The preview sets dir and lang around this example, as your app sets them on <html>. // It uses components added with "rtl": true. See the RTL guide.

<div class="flex min-w-0 items-center gap-4">
    <Skeleton Class="h-12 w-12 shrink-0 rounded-full" />
    <div class="min-w-0 space-y-2">
        <Skeleton Class="h-4 w-[250px] max-w-full" />
        <Skeleton Class="h-4 w-[200px] max-w-full" />
    </div>
</div>