relsa

    0.9.7 • Public • Published

    Relsa 🚂

    Tests coverage npm version License: MIT

    Relsa is javascript-made horizontal progress bar with switchable steps. No dependencies. My first project btw :)

    Demo GIF

    🏠 Homepage

    Install

    npm install relsa

    Usage

    1. 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';
    1. Add block with selector classname:
    <body>
      <div class="relsa"></div>
    </body>
    1. 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 dot
    • setPrev() — sets previous active dot
    • setActiveItem(index) — sets active dot by index

    Contacts

    👤 Oleg Sergeev

    🤝 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

    Install

    npm i relsa

    DownloadsWeekly Downloads

    4

    Version

    0.9.7

    License

    MIT

    Unpacked Size

    19.8 kB

    Total Files

    6

    Last publish

    Collaborators

    • 0leg53