smart-skeleton
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Smart Skeleton

A flexible and customizable skeleton loading component for React applications.

Installation

npm install smart-skeleton

Features

  • 🎨 Fully customizable dimensions
  • 🌓 Dark mode support
  • ⚡ Tailwind CSS integration
  • 🔄 Smooth animation
  • 📱 Responsive design
  • 🎯 TypeScript support

Usage

import { SmartSkeleton } from 'smart-skeleton';

// Text skeleton
<SmartSkeleton width="100%" height={20} />

// Avatar skeleton
<SmartSkeleton width={48} height={48} rounded />

// Multiple line skeleton
<SmartSkeleton width="100%" height={20} count={3} gap={8} />

// Card skeleton
<div className="space-y-2">
  <SmartSkeleton width={300} height={200} />
  <SmartSkeleton width={200} height={20} />
  <SmartSkeleton width={100} height={20} />
</div>

Props

Prop Type Default Description
width string | number '100%' Width of the skeleton
height string | number '1rem' Height of the skeleton
rounded boolean false Whether to show rounded corners
animate boolean true Whether to show animation
count number 1 Number of skeleton items
direction 'row' | 'column' 'column' Direction of multiple items
gap string | number '0.5rem' Gap between multiple items
className string '' Additional CSS classes

License

MIT

Package Sidebar

Install

npm i smart-skeleton

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

85.5 kB

Total Files

4

Last publish

Collaborators

  • bryik_