Gathering detailed insights and metrics for @achmadk/react-epic-spinner-css
Gathering detailed insights and metrics for @achmadk/react-epic-spinner-css
Gathering detailed insights and metrics for @achmadk/react-epic-spinner-css
Gathering detailed insights and metrics for @achmadk/react-epic-spinner-css
React Components to show Spinners from epic-spinner with CSS
npm install @achmadk/react-epic-spinner-css
Typescript
Module System
Node Version
NPM Version
72.6
Supply Chain
97.6
Quality
74.9
Maintenance
100
Vulnerability
100
License
JavaScript (90.42%)
TypeScript (6.18%)
CSS (2.91%)
HTML (0.49%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,424
Last Day
1
Last Week
6
Last Month
43
Last Year
329
1 Commits
2 Watching
3 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
@achmadk/react-epic-spinner-css@1.0.0
Unpacked Size
113.10 kB
Size
22.21 kB
File Count
31
NPM Version
8.11.0
Node Version
18.16.0
Publised On
07 Jun 2023
Cumulative downloads
Total Downloads
Last day
-75%
1
Compared to previous day
Last week
-14.3%
6
Compared to previous week
Last month
16.2%
43
Compared to previous month
Last year
-45.3%
329
Compared to previous year
1
21
This library represents the React adaptation of EpicMax's Vue epic-spinners
Compared to react-epic-spinners
, this library offers several advantages for professional use:
styled-components
dependency, which can potentially cause issues in your web application due to multiple versions of styled-components
.postcss
and purgecss
.Using NPM
1npm install @achmadk/react-epic-spinner-css
Or Yarn
1yarn add @achmadk/react-epic-spinner-css
0.0.3
to 1.0.0
react
to version 17.0.0, which incorporates support for hooks and allows importing from react/jsx-runtime
1- import from '@achmadk/react-epic-spinner-css/dist/react-epic-spinner-css.css' 2+ import from '@achmadk/react-epic-spinner-css/dist/style.css'
An online demo is available here
import react-epic-spinner-css.css
first
1import '@achmadk/react-epic-spinner-css/dist/style.css'
All components inherit properties from the <div>
element, such as style
, className
, onClick
, and so on. There are optional props provided to customize ones:
size
[number]
: Determines the rendering size of the spinner.color
[string]
: defaults to #fff
. Defines the spinner's color.animationDelay
[number]
: Indicates the spinner animation's duration. Lower values result in quicker animation restarts.1import { AtomSpinner } from '@achmadk/react-epic-spinner-css' 2 3// In your render function or SFC return 4<AtomSpinner color="red">
All components are named exports of the package.
1import { ... } from '@achmadk/react-epic-spinner-css'
@fullhuman/postcss-purgecss
and postcss
1yarn add -D @fullhuman/postcss-purgecss postcss
postcss.config.js
into your app root project1const purgecss = require('@fullhuman/postcss-purgecss') 2 3module.exports = { 4 plugins: [ 5 // only optimize CSS when process.env.NODE_ENV is production 6 ...(process.env.NODE_ENV === 'production' ? [purgecss({ 7 content: [ 8 './**/*.js', 9 './**/*.jsx', 10 // if you are using TypeScript, please add this. 11 './**/*.ts', 12 './**/*.tsx' 13 ], 14 // include `@achmadk/react-epic-spinner-css` css file to be processed. 15 css: ['./node_modules/@achmadk/react-epic-spinner-css/dist/*.css'], 16 // remove unused CSS keyframe definitions 17 keyframes: true, 18 safelist: { 19 greedy: [ 20 // if you are using AtomSpinner, you can add /^atom-spinner/ . 21 // in this case, i am using SpringSpinner component 22 /^spring-spinner/ 23 ] 24 } 25 })] : []) 26 ] 27} 28
Because of some bugs with flexbox
on Firefox, the following components may not render properly
If you know a fix for it, please send a PR :)
[x] Storybook (WIP)
[ ] unit testing with jest
and @testing-library/*
MIT.
No vulnerabilities found.
No security vulnerabilities found.