
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
react-csspin
Advanced tools
Spinner UI Component for React 18.x.~ This project is an wrapper of CSSPIN
Author : Stephen Won(원형섭), OpenSG Inc.
Online Demo : https://react-csspin.vercel.app/
MIT
npm install react-csspin
//import
import { ReactCsspin } from "react-csspin";
import 'react-csspin/dist/style.css';
//usage
<ReactCsspin
message={message} spinStyle={spinStyle}
color={color} opacity={Number(opacity)} />
import React, { useState } from "react";
import { ReactCsspin } from "react-csspin";
import 'react-csspin/dist/style.css';
const App = () => {
const [message, setMessage] = useState<string>("Loading");
const [spinStyle, setSpinStyle] = useState<string>("cp-round");
const [opacity, setOpacity] = useState<string>("0.7");
const [color, setColor] = useState<string>("white");
const [visible, setVisible] = useState<boolean>(false);
const viewReactCsspin = () => {
setVisible(true);
setTimeout(() => {
setVisible(false);
}, 5000);
};
return (
<div>
<h2>ReactCsspin Test</h2>
<hr />
Loading Message :{" "}
<input
type="text"
value={message}
onChange={(e) => setMessage(e.target.value)}
/>
<br />
Spinner Style :
<select onChange={(e) => setSpinStyle(e.target.value)} value={spinStyle}>
<option>cp-round</option>
<option>cp-pinwheel</option>
<option>cp-balls</option>
<option>cp-bubble</option>
<option>cp-flip</option>
<option>cp-hue</option>
<option>cp-skeleton</option>
<option>cp-eclipse</option>
<option>cp-boxes</option>
<option>cp-morph</option>
<option>cp-heart</option>
<option>cp-meter</option>
</select>
<br />
opacity(0 < x < 1) :{" "}
<input
type="text"
value={opacity}
onChange={(e) => setOpacity(e.target.value)}
/>
<br />
background-color :
<select onChange={(e) => setColor(e.target.value)} value={color}>
<option>black</option>
<option>white</option>
<option>red</option>
<option>yellow</option>
<option>blue</option>
<option>aqua</option>
<option>green</option>
<option>orange</option>
<option>brown</option>
<option>salmon</option>
<option>chocolate</option>
<option>bisque</option>
</select>
<br />
<button onClick={viewReactCsspin}>Test Spinner</button>
{visible ? (
<ReactCsspin
message={message}
spinStyle={spinStyle}
color={color}
opacity={Number(opacity)}
/>
) : (
""
)}
</div>
);
};
export default App;
FAQs
React CSS Spinner UI Component
The npm package react-csspin receives a total of 1 weekly downloads. As such, react-csspin popularity was classified as not popular.
We found that react-csspin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.