
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
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
overrideandextenddefaults 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-shadowin 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
textShadowunder 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.
The npm package tailwindcss-textshadow receives a total of 12,020 weekly downloads. As such, tailwindcss-textshadow popularity was classified as popular.
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
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.