Git Product home page Git Product logo

speedybar's Introduction

speedyBar

How to Use

Copy and Paste

Create an speedyBar element on your template

<div class="speedyWrapper">
  <speedy-bar></speedy-bar>
</div>

put some styling on both elements, example:

.speedyWrapper {
  width: 100%;
  position: fixed;
  top: 0;
}

speedy-bar {
    display: inherit;
    width: 0%;
    background: red;
    height: 3px;
    transition: .5s all;
}

you can customize the color or the width, ANYTHING!.

and put this on your javascript file

const speedyBar = document.getElementsByTagName ("speedy-bar")[0];
// [0] can be [1], [2], etc as you want

Initializing

You need to set some settings at first use.

just put those line on your javascript file

speedybar.init = {
  times: 3,         //  how many steps do you use 
  duration: 500   //  how long the duration step-to-step (in ms)
};

Features

Counter (Step)

speedyBar.step();

this is the one-step function for animate the bar from n-1 to n if the bar reaches it max width it'll start from 0, again

towards to a certain point

speedyObj.goPos(5); // must integer and not higher than times that was set

That's All.

speedybar's People

Contributors

mlio22 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.