GithubHelp home page GithubHelp logo

marcroelans / ui-preloader Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.48 MB

🔆 Simple ui-preloader vanilla js component.

Home Page: https://neulandagentur.github.io/ui-preloader/

License: MIT License

HTML 25.41% JavaScript 42.66% SCSS 31.92%

ui-preloader's Introduction


Ui-Preloader is a simple vanilla js component for simple messages in the browser.

Install / Import

via npm

Install the package

npm i ui-preloader --save
import { init as UiPreloaderInit } from 'ui-preloader';

via script

Download the file ui-preloader.js in the js/dist/ folder and place it into your html file.

...
<body>

  ...
  <script src="ui-prelader.js"></script>
  <script>
    // use here
  </script>

</body>

API

To create a preloader component you just need to call the init function. The first argument is the root. It´s the container where the component gets inserted. Root is by default the body element.

init(root <HTML Element>)

  const myPreloader = init(document.querySelector('.container'));

destroy() Once you create an inheritance and the preloader is not needed anymore you can just call the destroy method to remove it from the dom.

 myPreloader.destroy()

ui-preloader's People

Contributors

janmarkuslanger avatar alexprediger avatar marcroelans avatar dependabot[bot] avatar naitszox avatar

Stargazers

 avatar

Watchers

James Cloos 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.