77
88Tailwind plugin for hide scrollbars, although the element can still be scrolled if the element's content overflows.
99
10- <img src =" https://user-images.githubusercontent.com/12596485/142972957-272010d3-29f6-4be7-99e1-dd03e7a8b92b.gif " alt =" tailwind-scrollbar-hide animation demo " height = " 500 " />
10+ <img src =" https://user-images.githubusercontent.com/12596485/142972957-272010d3-29f6-4be7-99e1-dd03e7a8b92b.gif " alt =" tailwind-scrollbar-hide animation demo " width = " 400 " />
1111
1212[ 🕹 Live Playground] ( https://reslear.github.io/tailwind-scrollbar-hide/ )
1313
1414## Features
1515
16- 🎨 Tailwind v2.x, v3.x, v4.x
16+ 🎨 Tailwind v4.x, v3.x, v2.x.
17+
18+ 📦 Zero dependencies
1719
1820🛠️ Port for [ unocss-preset-scrollbar-hide] ( https://github.com/reslear/unocss-preset-scrollbar-hide )
1921
20- ![ Firefox >=64 Chrome >= 2 Safari >= 4 Internet Explorer >= 10 ] ( https://badges.herokuapp.com/browsers?googlechrome=2&firefox=64&safari=4&iexplore=10 )
22+ 🎯 Pure CSS implementation for v4.x
2123
2224## Installation
2325
@@ -27,14 +29,36 @@ Install the plugin from npm:
2729# Using npm
2830npm install tailwind-scrollbar-hide
2931
32+ # Using pnpm
33+ pnpm add tailwind-scrollbar-hide
34+
3035# Using Yarn
3136yarn add tailwind-scrollbar-hide
37+ ```
3238
33- # Using pnpm
34- pnpm add tailwind-scrollbar-hide
39+ ### Tailwind v4 support
40+
41+ ![ Firefox >=64 Chrome >= 2 Safari >= 4] ( https://badges.herokuapp.com/browsers?googlechrome=2&firefox=64&safari=4 )
42+
43+
44+ For Tailwind v4, you can use the following approach in your CSS configuration file:
45+
46+ ``` css
47+ /* index.css */
48+ @import ' tailwindcss' ;
49+ @import ' tailwind-scrollbar-hide/v4' ;
3550```
3651
37- Then add the plugin to your config file:
52+ This will automatically import and configure the plugin for Tailwind v4.
53+
54+ > Note: Internet Explorer functionality has been dropped in Tailwind v4
55+
56+ ### Tailwind v2.x, v3.x support
57+
58+ ![ Firefox >=64 Chrome >= 2 Safari >= 4 Internet Explorer >= 10] ( https://badges.herokuapp.com/browsers?googlechrome=2&firefox=64&safari=4&iexplore=10 )
59+
60+
61+ For Tailwind v2.x and v3.x, add the plugin to your config file:
3862
3963``` js
4064// tailwind.config.js
@@ -64,16 +88,6 @@ export default {
6488} satisfies Config
6589```
6690
67- ### Tailwind v4 support
68-
69- [ Use legacy configuration files] ( https://tailwindcss.com/docs/v4-beta#using-legacy-configuration-files ) like:
70-
71- ``` css
72- /* index.css */
73- @import ' tailwindcss' ;
74- @config "../../tailwind.config.js";
75- ```
76-
7791## Usage
7892
7993Use in you template ` scrollbar-hide ` for visual hiding scrollbar
@@ -97,4 +111,4 @@ or restore default value use `scrollbar-default`
97111
98112## License
99113
100- [ MIT] ( ./LICENSE )
114+ [ MIT] ( ./LICENSE )
0 commit comments