Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
uigradients
Advanced tools
npm install --save uigradients
or
yarn add uigradients
// Import the component...
import { Gradient } from 'uigradients';
// Now, use it!
class App extends Component {
// If no gradient preset is provided,
// a random preset will be used.
return (
<Gradient preset="cherry">
<h1>This will draw a div with a cherry gradient, like the one you're looking at right now.</h1>
</Gradient>
);
}
cherry
is only one of the many presets provided byuigradients
A complete list of the gradient presets can be previewed here. You can use your own preset library via
GradientProvider
import { Gradient } from 'uigradients';
class App extends Component {
return (
// Add a "type" attribute on your component and
// set it to "radial" for a radial gradient!
// NOTE: If a "type" attribute is not on
// your component, the gradient type will
// default to linear
<Gradient preset="aubergine" type="radial">
<h1>Wow, a radial gradient!</h1>
</Gradient>
);
}
import { generator } from 'uigradients';
generator({preset: 'intuitive_purple'});
/* The function above returns:
background-color: ,#DA22FF,;
background-image: -webkit-linear-gradient(
left,
,#DA22FF,,
,#9733EE,);
background-image: linear-gradient(
to left,
,#DA22FF,,
,#9733EE,);
*/
styled-components
import { generator } from 'uigradients';
import styled from 'styled-components';
const Pre = styled.pre`
${generator({preset: 'electric_violet'})}
border-radius: 4px;
display: block;
`;
import { Gradient } from 'uigradients';
import styled from 'styled-components';
const Header = styled(Gradient)`
min-height: 300px;
text-align: center;
width: 100%;
`;
import { generator } from 'uigradients';
import styled from 'styled-components';
const RadialComponent = styled.div`
${generator({gradient: 'electric_violet', type: 'radial'})}
`;
This package is released under the MIT License
FAQs
a uigradients.com generator react & styled-components.
We found that uigradients demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.