
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.
react-css-page-loader
Advanced tools
A powerful React component for page loading animations with automatic route detection, custom loaders, and external state control
A powerful React component for page loading animations with CSS-based animations, automatic route detection, and customizable loading states.

npm install react-css-page-loader
import React from 'react';
import PageLoader from 'react-css-page-loader';
function App() {
return (
<PageLoader loadingText="Loading..." duration={2000}>
<YourPageContent />
</PageLoader>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
animationType | 'circle' | 'text' | 'custom' | 'circle' | Type of loading animation |
loadingText | string | 'Loading...' | Text to display during loading |
duration | number | 2000 | Loading duration in milliseconds |
isLoading | boolean | undefined | External loading state control |
onLoadingComplete | () => void | undefined | Callback when loading completes |
customLoader | ReactNode | undefined | Custom loading content |
customStyles | React.CSSProperties | undefined | Custom styles for loader |
autoRouteLoading | boolean | false | Enable automatic route change detection |
<PageLoader
animationType="circle"
loadingText="Loading..."
duration={2000}
>
<YourContent />
</PageLoader>
<PageLoader
animationType="text"
loadingText="Loading Page..."
duration={2500}
>
<YourContent />
</PageLoader>
<PageLoader
animationType="custom"
customLoader={
<div style={{ color: 'white', fontSize: '24px' }}>
Custom Loading Content
</div>
}
duration={2000}
>
<YourContent />
</PageLoader>
import React, { useState } from 'react';
import PageLoader from 'react-css-page-loader';
function App() {
const [isLoading, setIsLoading] = useState(false);
const handleButtonClick = () => {
setIsLoading(true);
// Simulate async operation
setTimeout(() => {
setIsLoading(false);
}, 3000);
};
return (
<div>
<button onClick={handleButtonClick}>Start Loading</button>
<PageLoader
isLoading={isLoading}
onLoadingComplete={() => console.log('Loading completed!')}
loadingText="Processing..."
duration={3000}
>
<YourContent />
</PageLoader>
</div>
);
}
<PageLoader
customStyles={{
backgroundColor: 'rgba(0, 0, 0, 0.8)',
borderRadius: '15px',
padding: '30px'
}}
loadingText="Loading..."
duration={2000}
>
<YourContent />
</PageLoader>
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import PageLoader from 'react-css-page-loader';
function App() {
return (
<BrowserRouter>
<PageLoader
autoRouteLoading={true}
loadingText="Loading Page..."
duration={2000}
>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
<Route path="/contact" element={<Contact />} />
</Routes>
</PageLoader>
</BrowserRouter>
);
}
import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import PageLoader from 'react-css-page-loader';
function App() {
return (
<BrowserRouter>
<Routes>
<Route path="/" element={
<PageLoader loadingText="Loading Home..." duration={2000}>
<Home />
</PageLoader>
} />
<Route path="/about" element={
<PageLoader loadingText="Loading About..." duration={2500}>
<About />
</PageLoader>
} />
<Route path="/contact" element={
<PageLoader loadingText="Loading Contact..." duration={2000}>
<Contact />
</PageLoader>
} />
</Routes>
</BrowserRouter>
);
}
<PageLoader
animationType="custom"
customLoader={
<div style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
color: 'white'
}}>
<div style={{
width: '50px',
height: '50px',
border: '3px solid #fff',
borderTop: '3px solid transparent',
borderRadius: '50%',
animation: 'spin 1s linear infinite'
}} />
<p style={{ marginTop: '20px' }}>Custom Loading...</p>
</div>
}
customStyles={{
backgroundColor: 'rgba(0, 0, 0, 0.9)',
borderRadius: '20px',
padding: '40px',
boxShadow: '0 10px 30px rgba(0, 0, 0, 0.3)'
}}
duration={3000}
onLoadingComplete={() => console.log('Custom loading completed!')}
>
<YourContent />
</PageLoader>
The package includes built-in CSS animations. You can override them by importing the CSS:
import 'react-css-page-loader/dist/index.css';
Or use the CSS export:
import { PageLoaderCSS } from 'react-css-page-loader';
# Install dependencies
npm install
# Build the package
npm run build
# Watch for changes
npm run dev
MIT
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)FAQs
A powerful React component for page loading animations with automatic route detection, custom loaders, and external state control
We found that react-css-page-loader 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.