
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
tailwindcss-textshadow
Advanced tools
A Utility Plugins for controlling Text Shadow of an text element.
A Utility Plugins for controlling Text Shadow of an text element.
Class | Properties |
---|---|
.text-shadow | text-shadow: 0px 0px 1px rgb(0 0 0 / 20%), 0px 0px 1px rgb(1 0 5 / 10%); |
.text-shadow-sm | text-shadow: 1px 1px 3px rgb(36 37 47 / 25%); |
.text-shadow-md | text-shadow: 0px 1px 2px rgb(30 29 39 / 19%), 1px 2px 4px rgb(54 64 147 / 18%) |
.text-shadow-lg | text-shadow: 3px 3px 6px rgb(0 0 0 / 26%), 0 0 5px rgb(15 3 86 / 22%) |
.text-shadow-xl | text-shadow: 1px 1px 3px rgb(0 0 0 / 29%), 2px 4px 7px rgb(73 64 125 / 35%) |
.text-shadow-none | text-shadow: none |
Minimal Set-up.
Ready to use out of the box.
Has default preset shadows with variants.
Users will be able to
override
andextend
defaults the same way they can with Tailwind's built-in styles.
yarn add tailwindcss-textshadow --dev
npm i --save-dev tailwindcss-textshadow
Add the plugin to the plugins
array in your Tailwind configuration file (tailwind.config.js)
.
plugins: [
require('tailwindcss-textshadow')
]
:beer: Congratulations! You are ready to use
text-shadow
in your project.
Use .text-shadow-none
to remove an existing text shadow from an element. This is most commonly used to remove a shadow that was applied at a smaller breakpoint.
<span class="text-shadow-none"></span>
To control the textshadow of an text element at a specific breakpoint, add a {screen}:
prefix to any existing text shadow utility. For example, use xl:text-shadow-lg
to apply the text-shadow-lg
utility at only large screen sizes and above.
For more information about Tailwind's responsive design features, check out the Responsive Design documentation.
<div class="text-shadow sm:text-shadow-sm md:text-shadow-md lg:text-shadow-lg xl:text-shadow-xl ...">
<!-- ... -->
</div>
By default this plugin provides drop text shadow utilities with five modifires, and a utility for removing existing text shadows. You can change, add, or remove these by editing the theme.textShadow
section of your Tailwind config.
If a default
text shadow is provided, it will be used for the non-suffixed .text-shadow
utility. Any other keys will be used as suffixes, for example the key '2xl'
will create a corresponding .text-shadow-2xl
utility.
// tailwind.config.js
module.exports = {
theme: {
textShadow: {
'default': '0 2px 0 #000',
'md': '0 2px 2px #000',
'h2': '0 0 3px #FF0000, 0 0 5px #0000FF',
'h1': '0 0 3px rgba(0, 0, 0, .8), 0 0 5px rgba(0, 0, 0, .9)',
}
}
}
// tailwind.config.js
module.exports = {
theme: {
// ...
extend: {
// ...
textShadow: {
'2xl': '1px 1px 5px rgb(33 34 43 / 20%)',
'3xl': '0 0 3px rgba(0, 0, 0, .8), 0 0 5px rgba(0, 0, 0, .9)',
},
},
},
}
By default, only responsive, hover and focus variants are generated for text shadow utilities.
You can control which variants are generated for the text shadow utilities by modifying the textShadow
property in the variants section of your tailwind.config.js file.
For example, this config will also generate active and group-hover variants:
Use the name
textShadow
under variants object.
// tailwind.config.js
module.exports = {
variants: {
// ...
- textShadow: ['responsive', 'hover', 'focus'],
+ textShadow: ['responsive', 'hover', 'focus', 'active', 'group-hover'],
}
}
:green_heart: If you :+1: this, then please give a :star:. Thank you.
The MIT License (MIT). Please see License File for more information.
FAQs
A Utility Plugins for controlling Text Shadow of an text element.
We found that tailwindcss-textshadow 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.