
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
tailwindcss-gradients
Advanced tools
npm install tailwindcss-gradients
// tailwind.config.js
{
theme: {
linearGradients: {
directions: { // defaults to these values
't': 'to top',
'tr': 'to top right',
'r': 'to right',
'br': 'to bottom right',
'b': 'to bottom',
'bl': 'to bottom left',
'l': 'to left',
'tl': 'to top left',
},
colors: { // defaults to {}
'red': '#f00',
'red-blue': ['#f00', '#00f'],
'red-green-blue': ['#f00', '#0f0', '#00f'],
},
},
radialGradients: {
shapes: { // defaults to this value
'default': 'ellipse',
},
sizes: { // defaults to this value
'default': 'closest-side',
},
positions: { // defaults to these values
'default': 'center',
't': 'top',
'tr': 'top right',
'r': 'right',
'br': 'bottom right',
'b': 'bottom',
'bl': 'bottom left',
'l': 'left',
'tl': 'top left',
},
colors: { // defaults to {}
'red': '#f00',
'red-blue': ['#f00', '#00f'],
'red-green-blue': ['#f00', '#0f0', '#00f'],
},
},
},
variants: {
linearGradients: ['responsive'], // defaults to ['responsive']
radialGradients: ['responsive'], // defaults to ['responsive']
},
plugins: [
require('tailwindcss-gradients')(),
],
}
or you can reference your existing theme colors:
{
theme: {
colors: {
'red': '#f00',
'blue': '#00f',
},
linearGradients: theme => ({
// directions: { ... },
colors: theme('colors'),
}),
radialGradients: theme => ({
// shapes: { ... },
// sizes: { ... },
// positions: { ... },
colors: theme('colors'),
}),
},
plugins: [
require('tailwindcss-gradients')(),
],
}
This plugin generates the following utilities:
/* configurable with the "linearGradients" theme object */
.bg-gradient-[direction-key]-[color-key] {
background-image: linear-gradient([direction-value], [color-value-1], [color-value-2], [...]);
}
/* configurable with the "radialGradients" theme object */
/* note that the "default" [shape-key], [size-key], and [position-key] are omitted from the class */
.bg-radial-[shape-key]-[size-key]-[position-key]-[color-key] {
background-image: radial-gradient([shape-value] [size-value] at [position-value], [color-value-1], [color-value-2], [...]);
}
[2.0.1] - 2019-05-23
inherit
or currentColor
FAQs
Tailwind CSS plugin to generate gradient background utilities
The npm package tailwindcss-gradients receives a total of 2,809 weekly downloads. As such, tailwindcss-gradients popularity was classified as popular.
We found that tailwindcss-gradients 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.