
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-loaders
Advanced tools
Lightweight wrapper around Loaders.css.
npm install --save react-loaders loaders.css
Require the component.
var Loader = require('react-loaders').Loader;
// also available as `default`
function renderLoader() {
return <Loader type="line-scale" active />
}
static propTypes = {
type: PropTypes.string,
active: PropTypes.bool,
color: PropTypes.string,
innerClassName: PropTypes.string, // applied to the same div as .loader-inner.${type}
// useful for advanced styling
// className & style are implied
};
Note: in ~2.x we had a size prop declared, but it never did anything so for 3.0 it has been removed. Why you ask? Well due to the way these are built by loaders.css, they are hardcoded to use specific pixel widths so sizing these natively would require rewriting that whole project.
Pro tip: you can resize these by simply passing style={{transform: 'scale(0.5)'}}
.
Import any of the animations you want to use.
$primary-color: $my-brand-color;
// How you import this will depend heavily on your build setup
// If using webpack though, `~` refers to node_modules
// @import '~loaders.css/src/animations/line-scale.scss'
@import 'loaders.css/src/animations/line-scale.scss'
.loader-hidden {
display: none;
}
.loader-active {
display: block;
}
If @import
ing with Sass, make you use something like autoprefixer to add backwards compatibility.
FAQs
Lightweight wrapper around Loaders.css
The npm package react-loaders receives a total of 23,458 weekly downloads. As such, react-loaders popularity was classified as popular.
We found that react-loaders 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.