# Adding Readline

                        
<script src="https://unpkg.com/readline-js/lib/readline-js.js"></script>
                        
or

npm install readline-js
                    

Add this code in <head>

# Initializing ReadLine (for v1.0 latest)

Calling ReadLine in body.
<script>
let readLine = new ReadLine({
    showPercentage:true,
    id:"target",
    height: "4px",
    color: "#00b8e6"
});
//destroying the readline-js
readLine.destroy();
</script>

You can call this function in head also.
<script>
    window.onload=function(){
        new ReadLine({
        id: "target",
        height: "3px",
        color: "red"
        });
    };
</script>
In React js
    import Readline from 'readline-js';
    ...
    useEffect(() => {
    
       let readline = new Readline({
         height: "3px",
         color: "red"
       })
       return ()=>{
         readline.destroy();
       }
   })

id(optional): id of the targeted content / Default whole body
showPercentage(optional): show percentage of content covered (slow in mobile)
height(optional): height of line / Default 6px
color(optional): color of line (rgb/rbga) / Default blue
.destroy(): Use this method on the readline object created to destroy or remove it

# Initializing ReadLine (For Old version v0.1)

Calling ReadLine in body.
<script>
ReadLine({
    showPercentage:true,
    id:"target",
    height: "4px",
    color: "#00b8e6"
});
</script>
You can call this function in head also.
<script>
    window.onload=function(){
        ReadLine({
        id: "target",
        height: "3px",
        color: "red"
        });
    };
</script>

id(optional): id of the targeted content / Default whole body
showPercentage(optional): show percentage of content covered (slow in mobile)
height(optional): height of line / Default 6px
color(optional): color of line (rgb/rbga) / Default blue