1.0.4 • Published 5 months ago
enchant-scrollbar v1.0.4
Enchant Scrollbar
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE.md file for details