
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
loading-wrapper
Advanced tools
A React component that wraps a tree of components and renders it as a custom loading indicator
A React component that wraps a tree of components and renders a wrapper div element when provided when flag is true. The content can be blurred, overlayed, deactivated; and a custom loading indicator can be added in addition to aforementioned features.

npm install loading-wrapper
import React from 'react';
import { LoadingWrapper } from 'loading-wrapper';
const App = () => {
const [loading, setLoading] = useState(false);
const toggleLoading = () => setLoading(loading => !loading);
return (
<React.Fragment>
<button onClick={toggleLoading}>Toggle Loading State</button>
<LoadingWrapper
when={loading}
blur={2}
opacity={1}
indicator={<Spin size="large" />}
overlay="lightyellow"
cursor="progress"
>
<SampleContent />
</LoadingWrapper>
</React.Fragment>
}
| Prop | Type | Default | Description |
|---|---|---|---|
| when | boolean | false | Controls when the following styles applied to the wrapped component |
| blur | number | 2 | Pixel unit blur value for css blur() function |
| opacity | number | 0.5 | Percentage unit opacity value for css opacity property |
| inactive | boolean | false | Controls pointer-events and user-select css properties |
| overlay | string | none | Background color of the wrapper component for custom indicator |
| cursor | string | default | Cursor value for css property cursor when mouse hovered on LoadingWrapper component |
| indicator | JSX.Element | null | Custom indicator that is rendered in the center of LoadingWrapper when = true |
FAQs
A React component that wraps a tree of components and renders it as a custom loading indicator
We found that loading-wrapper demonstrated a not healthy version release cadence and project activity because the last version was released 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.