relsa
v0.9.7
Published
Horizontal progress bar with switchable steps
Downloads
5
Maintainers
Readme
Relsa is javascript-made horizontal progress bar with switchable steps. No dependencies. My first project btw :)
🏠 Homepage
Install
npm install relsa
Usage
- Include css- and js- files to page:
<link rel="stylesheet" href="../dist/relsa.css" />
<script src="../dist/relsa.js"></script>
or
import Relsa from 'relsa';
import '~/node_modules/relsa/module/relsa.css';
- Add block with selector classname:
<body>
<div class="relsa"></div>
</body>
- Call the Relsa's instance with 'container' property:
var relsa = new Relsa({
container: '.relsa',
});
Options and methods:
Options:
container
(String),default: ".relsa-container"
— selector for Relsa's render node.render
(Number),default: 4
— sets quanity of rendering dots in Relsa.startIndex
(Number),default: 1
— sets initial active dot.customDotClassName
(String),default: ""
— adds custom classname for dots.isResponsive
(Boolean),default: true
— add compact view for small screens (max-width: 426px).
Methods:
setNext()
— sets next active dotsetPrev()
— sets previous active dotsetActiveItem(index)
— sets active dot by index
Contacts
👤 Oleg Sergeev
- Github: @0leg53
- LinkedIn: @sergeevoleg
- Telegram: @sergeevoleg
🤝 Contributing
Contributions, issues and feature requests are highly welcome! Feel free to check issues page. Also you can help me with this README :)
Show your support
Press project's ⭐️
Send 💸💰💸 here
README was generated by readme-md-generator