Plugin for Tailwind CSS to create utility classes for SVG backgrounds.
Install the plugin from npm:
# Using npm
npm install tailwindcss-basic-patterns
# Using Yarn
yarn add tailwindcss-basic-patterns
Then add the plugin to your tailwind.config.js
file:
// tailwind.config.js
module.exports = {
theme: {
// ...
},
plugins: [
require("tailwindcss-basic-patterns"),
// ...
],
};
<section class="relative">
<div class="absolute inset-0 bg-grid-slate-800/[0.1]"></div>
<div class="relative container">
<h1 class="text-3xl font-semibold">Some content goes here</h1>
</div>
</section>
You can configure which values and variants are generated by this plugin under the colors
keys in your tailwind.config.js
file:
// tailwind.config.js
module.exports = {
theme: {
colors: {},
},
};
Basic Pattern Repository by Thomas Michael Semmler