tailwind-scrollbar-hide
Advanced tools
Comparing version 1.1.7 to 1.3.0
{ | ||
"name": "tailwind-scrollbar-hide", | ||
"version": "1.1.7", | ||
"version": "1.3.0", | ||
"description": "tailwindcss plugin for hide scrollbar", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"dev": "vite ./playground" | ||
"keywords": [ | ||
"tailwindcss", | ||
"scrollbar", | ||
"scrollbar-hide" | ||
], | ||
"homepage": "https://github.com/reslear/tailwind-scrollbar-hide#readme", | ||
"bugs": { | ||
"url": "https://github.com/reslear/tailwind-scrollbar-hide/issues" | ||
}, | ||
@@ -13,35 +18,32 @@ "repository": { | ||
}, | ||
"license": "MIT", | ||
"author": "reslear", | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
} | ||
}, | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"src" | ||
"dist" | ||
], | ||
"keywords": [ | ||
"tailwindcss", | ||
"scrollbar" | ||
], | ||
"author": "reslear", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/reslear/tailwind-scrollbar-hide/issues" | ||
"scripts": { | ||
"build": "tsc", | ||
"prepublishOnly": "pnpm build" | ||
}, | ||
"homepage": "https://github.com/reslear/tailwind-scrollbar-hide#readme", | ||
"devDependencies": { | ||
"@semantic-release/changelog": "6.0.1", | ||
"@semantic-release/git": "10.0.1", | ||
"@types/node": "14.14.25", | ||
"@vitejs/plugin-vue": "1.1.4", | ||
"@vue/compiler-sfc": "3.0.5", | ||
"@vuedx/typecheck": "0.6.3", | ||
"@vuedx/typescript-plugin-vue": "0.6.3", | ||
"autoprefixer": "10.2.4", | ||
"conventional-changelog-conventionalcommits": "^4.6.1", | ||
"postcss": "8.2.5", | ||
"semantic-release": "18.0.0", | ||
"tailwindcss": "2.0.2", | ||
"typescript": "4.1.3", | ||
"vite": "2.0.0-beta.65", | ||
"vue": "3.0.5" | ||
"@types/node": "^22.10.2", | ||
"tailwindcss": "3.4.17", | ||
"typescript": "5.7.2" | ||
}, | ||
"peerDependencies": { | ||
"tailwindcss": ">=3.0.0 || >= 4.0.0 || >= 4.0.0-beta.8 || >= 4.0.0-alpha.20" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} | ||
} |
# tailwind-scrollbar-hide | ||
Tailwind plugin for hide scrollbars, although the element can still be scrolled if the element's content overflows. | ||
[](https://www.npmjs.com/package/tailwind-scrollbar-hide) | ||
 | ||
 | ||
[](https://github.com/semantic-release/semantic-release) | ||
[](https://packagephobia.com/result?p=tailwind-scrollbar-hide@1.1.6) | ||
 | ||
[](https://packagephobia.com/result?p=tailwind-scrollbar-hide) | ||
 | ||
Tailwind plugin for hide scrollbars, although the element can still be scrolled if the element's content overflows. | ||
 | ||
 | ||
[Live demo](https://reslear.github.io/packages/tailwind-scroll-hide/index.html) | ||
## Features | ||
- [x] Supports Chrome 2, Firefox 64, Safari 4, and Internet Explorer 10. | ||
- [x] Tailwind v2.x, v3.x, v4.x | ||
- Port for [unocss-preset-scrollbar-hide](https://github.com/reslear/unocss-preset-scrollbar-hide) | ||
## Installation | ||
@@ -34,3 +37,3 @@ | ||
Then add the plugin to your `tailwind.config.js` file: | ||
Then add the plugin to your config file: | ||
@@ -50,2 +53,27 @@ ```js | ||
or [using TypeScript](https://tailwindcss.com/docs/configuration#using-esm-or-type-script): | ||
```ts | ||
// tailwind.config.ts | ||
import type { Config } from 'tailwindcss' | ||
import scrollbarHide from 'tailwind-scrollbar-hide' | ||
export default { | ||
theme: { | ||
// ... | ||
}, | ||
plugins: [scrollbarHide] | ||
} satisfies Config | ||
``` | ||
### Tailwind v4 support | ||
[Use legacy configuration files](https://tailwindcss.com/docs/v4-beta#using-legacy-configuration-files) like: | ||
```css | ||
/* index.css */ | ||
@import 'tailwindcss'; | ||
@config "../../tailwind.config.js"; | ||
``` | ||
## Usage | ||
@@ -61,2 +89,4 @@ | ||
> ⚠️ webkit overriding not working https://github.com/reslear/tailwind-scrollbar-hide/issues/19#issuecomment-1086949110 need switch breakpoint system | ||
```html | ||
@@ -66,4 +96,9 @@ <div class="w-4 scrollbar-hide md:scrollbar-default">...</div> | ||
## Plugin Inspiration | ||
- https://github.com/tailwindlabs/tailwindcss-forms/tree/main | ||
- https://github.com/tailwindlabs/tailwindcss/discussions/2310#discussioncomment-8592440 | ||
## License | ||
[MIT](./LICENSE) |
5752
3
5
31
101
Yes
1
155473