
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A customizable React loading component with a spinning animation.
npm install th-loading
import { Loading } from 'th-loading';
function App() {
return <Loading />; // Uses default loading image
}
import { Loading } from 'th-loading';
function App() {
return (
<Loading imageUrl="https://path.to/your/custom/loading.gif" />
);
}
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| imageUrl | string | No | "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRFzebLh8zihBChP2pwfn2kwgJr2_IgwxSIqQ&s" | URL of the loading image |
The component comes with default styles but can be customized using CSS. Below are the default classes:
/* Centers the loader in its container */
.loader-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
/* Styles for the loading image */
.loader {
width: 50px;
height: 50px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
import React, { useState, useEffect } from 'react';
import { Loading } from 'th-loading';
function MyComponent() {
const [isLoading, setIsLoading] = useState(true);
useEffect(() => {
setTimeout(() => setIsLoading(false), 3000); // Simulate loading
}, []);
return (
<div>
{isLoading ? <Loading /> : <div>Your content here</div>}
</div>
);
}
Compatible with all modern browsers:
Contributions are welcome! Please feel free to open an issue or submit a Pull Request.
MIT © Refael Levi
If you encounter any issues or have questions, please open an issue on GitHub.
FAQs
A customizable React loading component with a spinning animation.
We found that th-loading 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.