Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tailwindcss-box-shadow

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwindcss-box-shadow

Tailwind CSS plugin that generates box-shadow utility values exactly as they're defined in the config.

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
decreased by-41.72%
Maintainers
1
Weekly downloads
 
Created
Source
Tailwind CSS

Tailwind CSS Box Shadow

Generate box-shadow utilities without CSS variables

Version Build Downloads License

This is a Tailwind CSS plugin that generates shadow utilities exactly as they are defined in the config - that is, without CSS variables.

Installation

Install the plugin from NPM:

npm install -D tailwindcss-box-shadow

Then add the plugin to your tailwind.config.js:

module.exports = {
  plugins: [
    require('tailwindcss-box-shadow'),
  ],
}

Usage

Use the shadow-{n} utilities to add box shadows to elements:

<div class="shadow-2xl">
  Box with big ass shadow
</div>

The plugin will generate the box-shadow utility exactly as defined in the Tailwind config, without --tw-shadow-* CSS variables:

- .shadow-xl {
-   --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
-   --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
-   box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
- }
+ .shadow-xl {
+   box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
+ }

Configuration

You may configure which utilities are generated by this plugin under the boxShadow key in your tailwind.config.js file:

module.exports = {
  theme: {
    extend: {
      boxShadow: {
        button: '0 3px 9px 0 rgba(0, 0, 0, 0.09)',
      }
    }
  },
}

Core plugins

In order to work, the plugin disables the following core Tailwind CSS plugins:

  • boxShadow
  • boxShadowColor

Keywords

FAQs

Package last updated on 18 Jun 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc