New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

overlay-reveal-effect

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

overlay-reveal-effect

React overlay reveal effect component

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Overlay reveal effect react-component.

Props

NameTypeDefaultDescription
childrennodeThe content node to be showed.
directionstringtop-rightDirection the child node will enter from.
isOpenbooleanfalseIf true, the component will transition in.
mainFonstring#90caf9The main background color.
secondaryFonstring#ec407aThe secondary background color of overlay.

Example

DEMO

import React, {useState} from 'react';
import OverlayEffect from 'overlay-reveal-effect';

class App extends React.Component {
  render() {
    const [open, setOpen] = useState(false);
    
    const handleOpen = () => {
      setOpen(true);
    };
    
    const handleClose = () => {
      setOpen(false);
    }

    return (
      <div>
        <button onClick={handleOpen}>OPEN</button>
        
        <OverlayEffect isOpen={open}>
          <h1>Overlay Effect</h1>
          <button onClick={handleClose}>CLOSE</button>
        </OverlayEffect>
      </div>
    )
  }
}

Keywords

animate

FAQs

Package last updated on 05 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts