An open API service indexing awesome lists of open source software.

https://github.com/rikschennink/scrollscreen

🌁 Custom styled vertical scrollbars
https://github.com/rikschennink/scrollscreen

custom scroll scrollbar style vertical

Last synced: 2 months ago
JSON representation

🌁 Custom styled vertical scrollbars

Awesome Lists containing this project

README

        

# Scrollscreen

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/rikschennink/scrollscreen/blob/gh-pages/LICENSE)
[![npm version](https://badge.fury.io/js/scrollscreen.svg)](https://badge.fury.io/js/scrollscreen)

Scrollscreen is a 1KB dependency free JavaScript library that positions a layer precisely on top of the browser default scrollbar in turn allowing custom styles.

Tested on IE11, Edge, Firefox, Chrome, Safari and iOS.

[Live demo](https://rikschennink.github.io/scrollscreen/)

## Installation

Add CSS file to `` and add JS file before end of ``.

## Usage

Put the `scrollscreen` CSS class on a container. Make sure the container's height is limited somehow so it's content overflows.

```html

.scrollscreen--track {
/* width of track, 18px covers native track on MacOS and Windows */
width: 18px;
background: #bebec1;
}

.scrollscreen--slider {
/* use for spacing between slider and track */
padding: .25em;
}

.scrollscreen--slider::after {
/* the slider button style */
background: #5f6165;
border-radius: 9999em;
}

.scrollscreen {
/* set scrollscreen to a fixed height to make scrollbars appear */
height: 100px;
}


Hi! I'm Scrollscreen!


Scrollscreen positions a layer precisely on top of the browser default scrollbar allowing custom styles.



```