Swanson-Tyler / react-text-reveal

A react text reveal tool.
17 stars 3 forks source link

Create/Export your custom reveal here: Motionlab

Features 🎉

Getting Started

  1. Install:

    npm install --save react-text-reveal
  2. Use:

<Reveal
    canPlay={true}
    ease={"cubic-bezier(0,0.4,0.4,1)"}
>
    WELCOME!
</Reveal>

<WordReveal
    animateOpacity={true}
    canPlay={true}
    copy={["Make.","Something.","Move."]}
    direction={"bottom"}
    duration={2500}
    ease={"cubic-bezier(0,0.4,0.4,1)"}
    offset={"225px"}
    perspective={true}
    perspectiveFOV={1000}
    perspectiveX={158}
    perspectiveY={13}
    perspectiveZ={0}
    wordOffsetDelay={200}
/>
<MultilineReveal
    animateOpacity={true}
    canPlay={true}
    copy={["Make.","Something.","Move."]}
    direction={"top"}
    duration={1275}
    ease={"cubic-bezier(0,0.4,0.4,1)"}
    multilineMasking={true}
    multilineOffsetDelay={200}
    offset={"45px"}
    perspective={true}
    perspectiveFOV={1000}
    perspectiveX={0}
    perspectiveY={13}
    perspectiveZ={0}
/>
<CharacterReveal
    animateOpacity={true}
    canPlay={true}
    characterOffsetDelay={95}
    characterWordSpacing={10}
    copy={["Make.","Something.","Move."]}
    direction={"bottom"}
    duration={1875}
    ease={"cubic-bezier(0,0.4,0.4,1)"}
    multilineMasking={false}
    multilineOffsetDelay={575}
    offset={'120px'}
    perspective={true}
    perspectiveX={158}
    perspectiveY={13}
    perspectiveZ={0}
    perspectiveFOV={1000}
/>

API

Basic Properties

These props can be used on all 4 component exports. (<Reveal />, <WordReveal/>, <MultilineReveal />, <CharacterReveal />)

<Reveal /> Specific Properties

These props can be used for the <Reveal /> component.

<WordReveal /> Specific Properties

These props can be used for the <WordReveal /> component.

<MultilineReveal /> Specific Properties

These props can be used for the <MultilineReveal /> component.

<CharacterReveal /> Specific Properties

These props can be used for the <CharacterReveal /> component.

Contributing

I'd love that.