visible-scroll
v1.0.0
Published
Exposes visible scrollbars
Maintainers
Readme
<visible-scroll/>
Attemps to keep the horizontal scrollbar visible in different overflow contexts.
Install
The project is distributed as an IIFE, so the easiest way is to just create a script tag pointing to the export hosted on unpkg.
<script src="unpkg.com/visible-scroll" defer></script>However, you can also install the package and add the script through some build process.
<script src="dist/visible-scroll.iife.js" defer></script>Usage
Once the script is loaded, you can add the new component to a page.
<visible-scroll>
<!-- Some scrollable content -->
</visible-scroll>Visibility depends on the user's device settings. If the user has configured the scrollbars to only show while scrolling, then the scrollbars will only be visible then.
Customizing
You may update the following properties to adjust dimension of the scrollable container.
| Property | Description |
| -------- | ----------- |
| --visible-scroll-max-width | Sets the maximum width for the scrollable container. |
| --visible-scroll-max-height | Sets the maximum height for the scrollable container. |
