Neverending Pun Machine

    read-more-toggler

    1.1.0 • Public • Published

    Read more toggler ..

    A simple pure javascript package to truncate paragraphs and add functionality to expand with read more and read less. Just add class="read-more" in your p element.

    npm i read-more-toggler
    <p class="read-more">YOUR LONG PARA</p>
    
    <script type="module">
      import { readMoreToggler } from "./main.js";
      readMoreToggler({
        charLimit: 250, // default is 100
        expandText: "show more", // default is 'Read more'
        collapseText: "collapse", // default is 'Show less'
      });
    </script>

    Install

    npm i read-more-toggler

    DownloadsWeekly Downloads

    3

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    7.44 kB

    Total Files

    4

    Last publish

    Collaborators

    • pratikkute