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

tailwind-scrollbar

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwind-scrollbar - npm Package Compare versions

Comparing version 1.0.1 to 1.1.2

4

index.js

@@ -51,3 +51,3 @@ const plugin = require('tailwindcss/plugin');

module.exports = plugin(function ({ e, addUtilities, theme, addBase }) {
module.exports = plugin(function ({ e, addUtilities, theme, addBase, variants }) {
const generateScrollbarColorUtilities = (colors, prefix = '') => Object.entries(colors)

@@ -92,3 +92,3 @@ .reduce((memo, [key, value]) => ({

...generateScrollbarColorUtilities(theme('colors', {}))
});
}, variants('scrollbar'));
});
{
"name": "tailwind-scrollbar",
"version": "1.0.1",
"version": "1.1.2",
"description": "Tailwind plugin for styling scrollbars",

@@ -5,0 +5,0 @@ "author": "Graham Still <gstill92@gmail.com>",

@@ -15,4 +15,2 @@ # Scrollbar Plugin for Tailwind CSS

## Usage
Add it to the plugins array of your Tailwind config.

@@ -23,10 +21,23 @@

// ...
require('tailwind-scrollbar')(),
require('tailwind-scrollbar'),
],
```
## Usage
For every element that you want to style, add either the `.scrollbar` or `.scrollbar-thin` class. You may then add any `scrollbar-track-{color}`, `scrollbar-thumb-{color}` or `hover:scrollbar-thumb-{color}` classes you like. (Note that `hover:scrollbar-thumb-{color}` classes only have effects in webkit-based browsers.
## Configuration
If you'd like to add varients for the scrollbar utilities (e.g. [dark mode](https://tailwindcss.com/docs/dark-mode)), add them to the `variants` object in your Tailwind config:
```
variants: {
// ...
scrollbar: ['dark']
}
```
## License
This project is licensed under the [MIT License](/LICENSE).
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