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 standard box-shadow utilities, without CSS variables.

  • 1.0.0
  • Source
  • npm
  • Socket score

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

tailwindcss-box-shadow

A plugin that generates shadow utilities exactly as you have them defined in your theme config, without CSS variables.

But... why?

I needed shadow utilities in Maizzle that don't rely on the new CSS variables strategy in Tailwind CSS 2.x.

Installation

Install the plugin from npm:

# Using npm
npm install tailwindcss-box-shadow

# Using Yarn
yarn add tailwindcss-box-shadow

Then add the plugin to your tailwind.config.js file, making sure to disable the default boxShadow plugin:

// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  corePlugins: {
    boxShadow: false,
  },
  plugins: [
    require('tailwindcss-box-shadow'),
    // ...
  ],
}

Usage

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

<div class="shadow-xl">
  Fugiat id id enim commodo.
</div>

Configuration

You can configure which values and variants are generated by this plugin under the boxShadow key in your tailwind.config.js file:

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      boxShadow: {
        button: '0 3px 9px 0 rgba(0, 0, 0, 0.09)',
      }
    }
  },
  variants: {
    boxShadow: ['responsive', 'hover']
  }
}

Keywords

FAQs

Package last updated on 29 Jan 2021

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