2.0.0 • Published 2 years ago

react-event-layer v2.0.0

Weekly downloads
35
License
MIT
Repository
github
Last release
2 years ago

Logo

React-event-layer

Show a layer when a event is fired on a component

Build Status

TODO

  • special entry/exit effect

Installing

npm install react-event-layer

Visual Example

Visual Example

Live Demo

https://ggggino.github.io/react-event-layer/examples

Getting Started

import {
  WrapperLayers,
  Layer
} from 'react-event-layer';

class AppComponent extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <div>
        <WrapperLayers enterMode="push" >
          <Layer z={0} selector="h3" event="click">
            <div className="backgroundedRedBox">
              <h3>hoverable</h3>
            </div>
          </Layer>
          <Layer z={10} animation={'fromTop'} selector="img" event="mouseenter">
            <div className="nemoLayer">
              <h4>Hover on Nemo</h4>
              <img src="..." />
            </div>
          </Layer>
          <Layer z={20} animation={'fromRight'} selector="h3" event="click">
            <div className="overNemoLayer">
              <h3>Another layer click me</h3>
            </div>
          </Layer>
      </WrapperLayers>
      </div>
    );
  }
}

Configuration

WrapperLayers props

NameTypeDefault valueDescription
enterModeStringpushThis props can have the values push or replace

Layer props

NameTypeDefault valueDescription
zInteger0Not required. If omitted this number is incremental.
selectorString""Not required. If omitted the selector will be the whole element. Example "div > img" or ".divClass"
eventString""Not required. This props suggest what event fires the animation to the next layer. If omitted, no event will be launched

Running the tests

npm run test

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • David Ginanni - Initial work - GGGGino

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

1.9.0

2 years ago

2.0.0

2 years ago

1.0.0

6 years ago

0.4.10

6 years ago

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago