Coder Social home page Coder Social logo

reactjs-overlay-loader's Introduction

reactjs-overlay-loader

Simple overlay loader for React. Overlay on part of page or entire page

NPM JavaScript Style Guide

reactjs-overlay-loader

reactjs-overlay-loader

Install

yarn add reactjs-overlay-loader

Or

npm install --save reactjs-overlay-loader

Simple Overlay on the entire page

import React from "react";

import ReactOverlayLoader from "reactjs-overlay-loader";

const App = () => {
  return (
    <ReactjsOverlayLoader isActive>
      The easiest way to use overlay
    </ReactjsOverlayLoader>
  );
};

Simple Overlay on parts of the page

import React from "react";

import ReactOverlayLoader from "reactjs-overlay-loader";

const App = () => {
  return (
    <div style={{ position: "relative" }}>
      <ReactjsOverlayLoader
        style={{
          position: "absolute"
        }}
        isActive
      >
        The easiest way to use overlay
      </ReactjsOverlayLoader>
    </div>
  );
};

Customized Overlay

import React from "react";

import ReactOverlayLoader from "reactjs-overlay-loader";

const App = () => {
  return (
    <ReactjsOverlayLoader
      loaderContent={<span style={{ color: "#ffffff" }}> Please wait...</span>}
      isActive
      style={{
        backgroundColor: "rgba(233, 30, 99, 0.81)"
      }}
    >
      The easiest way to use overlay
    </ReactjsOverlayLoader>
  );
};

Various loader options

Spinning, Audio, BallTriangle, Bars, Circles, Grid, Hearts, Oval, Puff, Rings, TailSpin, ThreeDots

API


Select props

name description type default
isActive enable or disable overlay boolean false
style (optional) you can provide your custom style object {}
loaderContent (optional) text/content need to be visible below loading icon string or jsx Loading...
iconType (optional) multiple loading icon options are available Spinning, Audio, BallTriangle, Bars, Circles, Grid, Hearts, Oval, Puff, Rings, TailSpin, ThreeDots string Spinning
icon (optional) you can provide your custom icon jsx svg

License

MIT © anilbad

reactjs-overlay-loader's People

Contributors

mranilrai avatar dependabot[bot] 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.