npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tailwindcss-textshadow

v2.1.3

Published

A Utility Plugins for controlling Text Shadow of an text element.

Downloads

41,919

Readme

tailwindcss-textshadow

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|

:bulb: Features

Minimal Set-up.

Ready to use out of the box.

Has default preset shadows with variants.

Users will be able to override and extend defaults the same way they can with Tailwind's built-in styles.

Installation & changes in tailwind.config.js

Yarn

yarn add tailwindcss-textshadow --dev

npm

npm i --save-dev tailwindcss-textshadow

:heavy_check_mark: import the plugin

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.

How to use

No text shadow

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>

Responsive

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>

Customizing

Text Shadow

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.

To override the default

// 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)',
     }
   }
 }

To extend the default


// 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)',
      },
    },
  },
}
  

Responsive and pseudo-class variants

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'],
  }
}

Credits

:green_heart: If you :+1: this, then please give a :star:. Thank you.

License

The MIT License (MIT). Please see License File for more information.