1.0.4 • Published 3 months ago

enchant-scrollbar v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

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

1.0.4

3 months ago

1.0.3

1 year ago

1.0.2

1 year ago