1.0.18 • Published 5 years ago

happy-helium v1.0.18

Weekly downloads
244
License
ISC
Repository
-
Last release
5 years ago

Happy Helium

Scroll reveal component built with React.

Usage

@import { FadeUp } from 'happy-helium'

<FadeUp>
  <YourChildComponent/>
</FadeUp>

Dependencies

react^16.2.0 | react-dom^16.2.0

⚠️ You must import the helium CSS file

import "~happy-helium/dist/css/happy-helium.css";

Components available

<FadeUp></FadeUp>
<FadeIn></FadeIn>
<FadeDown></FadeDown>
<FadeLeft></FadeLeft>
<FadeRight></FadeRight>
<ZoomIn></ZoomIn>

Default Options

PropNameTypeDefault
offsetnumber8
speednumber750
easingstring'cubic-bezier(0.215, 0.61, 0.355, 1)'
transitionDistancenumber50
delaynumber0
transitionOutbooltrue
onEnterfuncfalse
onExitfuncfalse

Default Options Override

const heliumOptions = {
  speed: 350,
  easing: 'ease',
  transitionDistance: 300,
  delay: 40,
  transitionOut: false,
  animation: true,
  offset: 50 //based on percentage from bottom of browser window
}

<FadeUp {...heliumOptions}></FadeUp>

Passing custom functions

<FadeUp 
  onEnter={() => console.log('on element enter')}
  onExit={() => console.log('on element exit'}
></FadeUp>
1.0.18

5 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago