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.
To install the plugin, you can use npm or yarn:
npm install enchant-scrollbar
or
yarn add enchant-scrollbar
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();
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
});
You can style the scrollable div by using the following classes:
/* e.g. padding for the content */
.enchant-scrollable-content {
padding: 10px;
}
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
This project is licensed under the MIT License - see the LICENSE.md file for details