7
7
8
8
Tailwind plugin for hide scrollbars, although the element can still be scrolled if the element's content overflows.
9
9
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 " />
11
11
12
12
[ 🕹 Live Playground] ( https://reslear.github.io/tailwind-scrollbar-hide/ )
13
13
14
14
## Features
15
15
16
- 🎨 Tailwind v2.x, v3.x, v4.x
16
+ 🎨 Tailwind v4.x, v3.x, v2.x.
17
+
18
+ 📦 Zero dependencies
17
19
18
20
🛠️ Port for [ unocss-preset-scrollbar-hide] ( https://github.com/reslear/unocss-preset-scrollbar-hide )
19
21
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
21
23
22
24
## Installation
23
25
@@ -27,14 +29,36 @@ Install the plugin from npm:
27
29
# Using npm
28
30
npm install tailwind-scrollbar-hide
29
31
32
+ # Using pnpm
33
+ pnpm add tailwind-scrollbar-hide
34
+
30
35
# Using Yarn
31
36
yarn add tailwind-scrollbar-hide
37
+ ```
32
38
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' ;
35
50
```
36
51
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:
38
62
39
63
``` js
40
64
// tailwind.config.js
@@ -64,16 +88,6 @@ export default {
64
88
} satisfies Config
65
89
```
66
90
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
-
77
91
## Usage
78
92
79
93
Use in you template ` scrollbar-hide ` for visual hiding scrollbar
@@ -97,4 +111,4 @@ or restore default value use `scrollbar-default`
97
111
98
112
## License
99
113
100
- [ MIT] ( ./LICENSE )
114
+ [ MIT] ( ./LICENSE )
0 commit comments