Giter Site home page Giter Site logo

kpthree / react-under-construction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dimimikadze/react-under-construction

0.0 2.0 0.0 18.97 MB

An easily customisable, responsive under construction react page component

License: MIT License

JavaScript 89.97% HTML 3.24% CSS 6.79%

react-under-construction's Introduction

React under construction component npm

Build Status Dependencies Dev Dependencies npm downloads

NPM

An easily customisable, responsive under construction react page component

Installation

npm i react-under-construction --save or yarn add react-under-construction

Usage

Note Parent containers should have width and height 100%, to react-under-construction was able to stretch full screen

import React from 'react';
import UnderConstruction from 'react-under-construction';

const App = () => (
  <UnderConstruction
    background={{
      image: 'https://static.pexels.com/photos/259698/pexels-photo-259698.jpeg',
      textColor: '#fff',
      overlay: {
        color: '#000',
        opacity: '.5'
      }
    }}
    logo={{
      src: 'https://image.ibb.co/b7guP5/Rubbby_without_text.png',
      alt: 'alt text'
    }}
    title={{
      text: 'Rubbby'
    }}
    description={{
      text: 'Our website is under construction. We\'ll be here soon, subscribe to be notified',
      style: {
        maxWidth: '440px',
      }
    }}
    subscribe={{
      placeholder: 'Enter your email',
      buttonText: 'Subscribe',
      onSubmit: (value) => {
        console.log('user typed email :', value);
      }
    }}
    links={[
      {
        url: 'https://www.facebook.com/',
        image: 'https://image.flaticon.com/icons/svg/220/220200.svg',
      },
      {
        url: 'https://www.twitter.com/',
        image: 'https://image.flaticon.com/icons/svg/145/145812.svg',
      },
      {
        url: 'https://www.linkedin.com/',
        image: 'https://image.flaticon.com/icons/svg/145/145807.svg',
      },
      {
        url: 'mailto:[email protected]',
        image: 'https://image.flaticon.com/icons/svg/321/321817.svg',
      },
    ]}
  />
);

export default App;

Other options

background={{
  image: {string} Background image of main container
  color: {string} Background color of main container,
  textColor: {string} Main text color for page
  overlay: {
    color: {string} Overlay color
    opacity: {string} Overlay opacity
  },
  style: {object} Additional style for main container
}}
logo={{
  src: {string} Image source
  alt: {string} Image alt text,
  style: {object} Additional style for logo
}}
title={{
  text: {string} Title text
  style: {object} Additional style for title
}}
description={{
  text: {string} description text
  style: {object} Additional style for description
}}
subscribe={{
  onSubmit: {function} Submit function for form, which receives input value 
  placeholder: {string} Placeholder text
  buttonText: {string} Button text
  inputStyle: {object} Additional style for input
  buttonStyle: {object} Additional style for button
}}
links: [
  {
    url: {string} Link url
    image: {string} Link image source
    text: {string} Link text
    imageStyle: {object} Additional style for image
    textStyle: {object} Additional style for text
  }
]

Demo

To run demo on your own computer:

react-under-construction's People

Watchers

 avatar  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.