enchant-scrollbar
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Enchant Scrollbar

npm version License: MIT

Installation

Welcome to the documentation for the Enchant Scrollbar plugin. This plugin provides a customizable scrollbar solution for enhancing the user experience on scrollable elements within your web application.

Installation

To install the plugin, you can use npm or yarn:

npm install enchant-scrollbar

or

yarn add enchant-scrollbar

Usage

Importing the plugin

To use the plugin, you can import it into your project and then call the init function on the element you want to make scrollable, or you can leave it empty and it will be applied on body.

import { EnchantScrollbar } 'enchant-scrollbar';

// if you want to apply it on body
const enchantScrollbar = new EnchantScrollbar();
enchantScrollbar.init();

Using on a div

import { EnchantScrollbar } 'enchant-scrollbar';

// if you want to apply it on a div
const el = document.getElementById('scrollable');
const enchantScrollbar = new EnchantScrollbar();
enchantScrollbar.init(el, {
    // options
});

Styling

You can style the scrollable div by using the following classes:

/* e.g. padding for the content */
.enchant-scrollable-content {
    padding: 10px; 
}

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Dependents (0)

Package Sidebar

Install

npm i enchant-scrollbar

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

22 kB

Total Files

7

Last publish

Collaborators

  • ali4zimi