
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@mohsensami/react-loading-skeleton
Advanced tools
A lightweight and customizable React component for creating loading skeleton screens. This package provides an easy way to implement loading states in your React applications with smooth animations and various shape options.
npm install @mohsensami/react-loading-skeleton
# or
yarn add @mohsensami/react-loading-skeleton
import { Skeleton } from "@mohsensami/react-loading-skeleton";
function MyComponent() {
return (
<div>
{/* Text skeleton */}
<Skeleton width={200} height={20} variant="text" />
{/* Circle skeleton */}
<Skeleton width={40} height={40} variant="circle" />
{/* Rectangle skeleton */}
<Skeleton width={300} height={100} variant="rect" />
</div>
);
}
The Skeleton component accepts the following props:
| Prop | Type | Default | Description |
|---|---|---|---|
| width | number | string | '100%' | Width of the skeleton element. Can be a number (in pixels) or a string (e.g., '100%') |
| height | number | string | '100%' | Height of the skeleton element. Can be a number (in pixels) or a string (e.g., '100%') |
| variant | 'text' | 'circle' | 'rect' | 'text' | Shape variant of the skeleton |
| style | CSSProperties | {} | Additional CSS styles to apply to the skeleton |
| className | string | undefined | Additional CSS class name to apply to the skeleton |
<Skeleton width={200} height={20} variant="text" />
<Skeleton width={40} height={40} variant="circle" />
<Skeleton width={300} height={100} variant="rect" />
<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
<Skeleton width={40} height={40} variant="circle" />
<div style={{ flex: 1 }}>
<Skeleton
width="100%"
height={20}
variant="text"
style={{ marginBottom: "8px" }}
/>
<Skeleton width="60%" height={16} variant="text" />
</div>
</div>
MIT © Mohsen Sami
FAQs
A simple React loading skeleton component
The npm package @mohsensami/react-loading-skeleton receives a total of 1 weekly downloads. As such, @mohsensami/react-loading-skeleton popularity was classified as not popular.
We found that @mohsensami/react-loading-skeleton demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.