tailwindcss plugin for hide scrollbar
Tailwind plugin for hide scrollbars, although the element can still be scrolled if the element’s content overflows.
Install the plugin from npm:
# Using npm
npm install tailwind-scrollbar-hide
# Using Yarn
yarn add tailwind-scrollbar-hide
# Using pnpm
pnpm add tailwind-scrollbar-hide
Then add the plugin to your tailwind.config.js
file:
// tailwind.config.js
module.exports = {
theme: {
// ...
},
plugins: [
require('tailwind-scrollbar-hide')
// ...
]
}
Use in you template scrollbar-hide
for visual hiding scrollbar
<div class="w-4 scrollbar-hide">...</div>
or restore default value use scrollbar-default
⚠️ webkit overriding not working https://github.com/reslear/tailwind-scrollbar-hide/issues/19#issuecomment-1086949110 need switch breakpoint system
<div class="w-4 scrollbar-hide md:scrollbar-default">...</div>