Tailwindcss utilities for text stroke
npm install @designbycode/tailwindcss-text-strokebash
pnpm add @designbycode/tailwindcss-text-stroke
`
#### Using npm
`bash
npm install @designbycode/tailwindcss-text-stroke
`
#### Using yarn
`bash
yarn add @designbycode/tailwindcss-text-stroke
`
First, ensure you have Tailwind CSS installed in your project. If not, install it by following the official documentation.
Next, require the plugin in your Tailwind CSS configuration file (usually named tailwind.config.js).
Setup
1. First, ensure you have Tailwind CSS installed in your project. If not, install it by following the official documentation.
2. Next, require the plugin in your Tailwind CSS configuration file (usually named tailwind.config.js).
`javascript
module.exports = {
// ...other configurations
plugins: [
// ...other plugins
require("@designbycode/tailwindcss-text-stroke"),
],
};
`
Once you've required the plugin and added it to the plugins array, you can use the new text stroke utilities in your HTML templates.
Use
The Text Stroke plugin provides the following utility classes for styling text with stroke effects:
* `.text-stroke`: Base component that sets the default text stroke styles. You can override these styles using CSS variables.
* `.text-stroke-{value}`: Sets the stroke width to the specified {value}. The available options are defined in the textStrokeWidth theme configuration.
* `.text-stroke-{color}`: Applies a custom color to the text stroke. The {color} should match a color in your Tailwind CSS color palette.
* `.text-stroke-fill-{color}`: Applies a custom fill color to the text stroke. The {color} should match a color in your Tailwind CSS color palette.
$3
Here's an example of how you can use the utility classes to apply image masks:
`html
Hello, TailwindCSS
`
$3
`html
Hello, TailwindCSS
``