Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Context Menu
  • Drawer
  • Footer
  • Menu
  • Navbar
  • On This Page
  • Separator
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • Container
  • Flex
  • Grid
  • Text
  • Link
  • Button
  • Form
    • AutocompleteNew
    • Checkbox
    • Color Picker
    • Date Picker
    • Date Range Picker
    • Datetime Picker
    • Datetime Range Picker
    • File Upload
    • Input GroupNew
    • NumericNew
    • Masked InputNew
    • Radio Button
    • Range SliderNew
    • RatingNew
    • Select
    • Slider
    • Switch
    • Tag InputNew
    • Text EditorNew
    • Textfield
    • Time Picker
    • Time Range Picker
  • Toggle
  • Toggle Group
  • Alert
  • Avatar
  • Badge
  • Chip
  • Empty
  • Icon
  • Popover
  • Progress
  • Skeleton
  • Spinner
  • Tooltip
  • Data Table
  • SpreadsheetNew
  • Column Filter Editor
  • Pagination
  • Pick List
  • Barcode
  • QR Code
  • Calendar
  • Table
  • Attachment
  • Overview
    • Bar
    • Bullet
    • Column
    • Dot Plot
    • Dumbbell
    • Icon
    • Lollipop
    • Radial Bar
    • Range
    • Word Cloud
    • Area
    • Bump
    • Bump Area
    • Candlestick
    • Gantt
    • Horizon
    • Line
    • Slope
    • Small Multiples
    • Stream Graph
    • Funnel
    • Gauge
    • Marimekko
    • Nightingale
    • Pie
    • Treemap
    • Waffle
    • Waterfall
    • Circular Treemap
    • Convex Treemap
    • Dendrogram
    • Sunburst
    • Barcode
    • Beeswarm
    • Box Plot
    • Density Plot
    • Histogram
    • Radial Histogram
    • Ridgeline
    • Strip Plot
    • Violin Plot
    • Categorical Scatter
    • Contour
    • Hexagonal Binning
    • Quadrant
    • Scatter
    • Heatmap
    • Matrix
    • Parallel Coordinates
    • Radar
    • Arc Diagram
    • Chord Diagram
    • Flowchart
    • Network Diagram
    • Sankey
    • Euler Diagram
    • Venn Diagram
  • Bubble
  • Marker
  • Message
  • Dialog Service
  • Toast Service
API DocumentationAI Agents & Skills
Home Get Started

Feedback

TwSkeleton

TwSkeleton is a Blazor loading placeholder. Choose a SkeletonType and Animation, set Width and Height, or generate one from ChildContent while Loading.

Last updated 18 October 2026

Basic usage

With no ChildContent, TwSkeleton renders a single full-width text line placeholder by default.
RAZOR
<TwSkeleton Id="basic-skeleton" />

Shapes

Use SkeletonType for a circle or rectangle placeholder instead, and Width/Height to size it.
RAZOR
<div class="flex flex-wrap items-end gap-6">
    <TwSkeleton Id="text-skeleton" SkeletonType="SkeletonType.Text" Width="220px" />
    <TwSkeleton Id="circle-skeleton" SkeletonType="SkeletonType.Circle" Width="50px" Height="50px" />
    <TwSkeleton Id="rectangle-skeleton" SkeletonType="SkeletonType.Rectangle" Width="200px" Height="110px" />
</div>

Animation

Use Animation to switch between a soft opacity pulse (default), a shimmering wave sweep, or no animation at all.
RAZOR
<div class="flex flex-wrap items-end gap-6">
    <TwSkeleton Id="pulse-skeleton" SkeletonType="SkeletonType.Rectangle" Width="160px" Height="80px" Animation="SkeletonAnimation.Pulse" />
    <TwSkeleton Id="wave-skeleton" SkeletonType="SkeletonType.Rectangle" Width="160px" Height="80px" Animation="SkeletonAnimation.Wave" />
    <TwSkeleton Id="none-skeleton" SkeletonType="SkeletonType.Rectangle" Width="160px" Height="80px" Animation="SkeletonAnimation.None" />
</div>

Auto-generated from content

Wrap real markup in ChildContent and toggle Loading - while loading, TwSkeleton measures the actual rendered layout of that content (via a ResizeObserver) and generates matching placeholder blocks automatically, instead of a single generic box.
JD

Jane Doe

Product Designer

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

RAZOR
<TwButton Class="mb-4" Color="Color.Primary" OnClick="ToggleLoading">
    @(loading ? "Finish loading" : "Reset")
</TwButton>

<TwSkeleton Id="profile-skeleton" Loading="loading">
    <TwCard>
        <div class="flex items-center gap-4">
            <TwAvatar Initials="JD" Color="Color.Primary" Size="AvatarSize.Large" />
            <div>
                <p class="font-semibold">Jane Doe</p>
                <p class="text-sm text-gray-600 dark:text-gray-400">Product Designer</p>
            </div>
        </div>
        <p class="mt-4 text-sm">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua.
        </p>
    </TwCard>
</TwSkeleton>
CSHARP
@code {
    private bool loading = true;
    
    private void ToggleLoading() => loading = !loading;
}

Keyboard navigation

A skeleton is not interactive and is not a Tab stop. While it is showing, screen readers are told the content is loading.

Theme configuration

Styling is controlled by TwBlazorTheme.Components (a TwSkeletonTheme), configured via the AddTwBlazor() options callback described on the Get Started page. Every property is a set of Tailwind classes, so changes are picked up by your own Tailwind build.
Property Type Controls
Base string
Text string
Circle string
Rectangle string
MeasuringWrapper string
Pulse string
Wave string

Full reference: TwSkeletonTheme on the API docs.

On this page

  • Basic usage
  • Shapes
  • Animation
  • Auto-generated from content
  • Keyboard navigation
  • Theme configuration
twblazor

The Tailwind CSS component library for Blazor. Accessible, themeable and MIT licensed.

Discord (opens in a new tab) GitHub(opens in a new tab)

Get started

  • Install guide
  • Theming
  • Class merging
  • Localization

Guides

  • Tailwind CSS with Blazor
  • Why twblazor?
  • Right to left
  • AI agents and skills

Resources

  • API documentation (opens in a new tab)
  • llms.txt (opens in a new tab)
  • MIT License (opens in a new tab)

Community

  • Contributing (opens in a new tab)
  • Code of conduct (opens in a new tab)
  • Report an issue (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload