We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Skeleton Component

The Skeleton component creates smooth, animated loading states that enhance user experience while content loads. With four versatile variants and customizable lines, it adapts to various content layouts.

  • Check Circle

    Multiple Variants: Four pre-built layouts for common use cases

  • Check Circle

    Customizable Lines: Adjustable number of lines for text content

  • Check Circle

    Smooth Animations: Built-in loading animations

  • Check Circle

    Responsive Design: Adapts to container width

Perfect for image placeholders while content loads:

<Skeleton type="image" class="h-20" />

Simulate paragraph content with varying line widths:

<Skeleton type="text" class="h-20 max-w-lg" lines={6} />

Two variants for user cards and content previews:

<Skeleton type="profile" class="h-20" lines={2} />
<Skeleton type="profile-2" class="h-20 max-w-lg" lines={2} />
Skeleton Component Props Extends <div> HTMLElement
Prop Type Default Description
type `image` | `profile` | `text` | `profile-2` `image` Sets the skeleton layout style
lines number Varies by type Number of lines for text/profile variants
  1. Content Matching

    • Match skeleton dimensions to actual content
    • Use appropriate variant for content type
    • Maintain consistent spacing
    • Consider mobile layouts
  2. Performance

    • Use lazy loading when appropriate
    • Optimize animation performance
    • Consider reduced motion preferences
    • Clean up on content load
Content Loading
Data Display
User Profiles
Image Placeholders
Article Previews
Image Galleries
Comment Sections
Dashboard Cards

Limited Time Launch Sale

Build better loading states today with our AstroJS starter template. Get instant access to the Skeleton component and many more UI elements.

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes