npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-text-reveal

v1.1.2

Published

A react text animation tool for advanced motion control.

Downloads

52

Readme

Create/Export your custom reveal here: Motionlab

Features 🎉

  • Simple – Uses basic CSS transition animations.
  • Flexible – Not dependent on Intersection Observer API. Trigger the animation whenever you want.
  • Advanced Control – Customize every aspect of the reveal to match any design.

Getting Started

  1. Install:
npm install --save react-text-reveal
  1. 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)"}
    offset={"45px"}
    multilineMasking={true}
    multilineOffsetDelay={200}
    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)"}
    offset={'120px'}
    perspective={true}
    perspectiveX={158}
    perspectiveY={13}
    perspectiveZ={0}
    perspectiveFOV={1000}
    multilineMasking={false}
    multilineOffsetDelay={575}
/>

API

Basic Properties

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

  • className (string)
    This prop allows you to append your own custom className to the outer div of the component.

  • canPlay (boolean) [default: false] This prop starts your animation. You must start with this prop set to false.

  • ease (string) [default: 'ease-out'] This prop allows you to control the transition-timing-function of your animation.

  • from (string) [default: 'bottom'] This prop allows you to control which direction your animation starts from.

  • duration (float) [default: 1275] This prop allows you to control the transition-duration of you animation in ms.

  • offset (string) [default: '45px'] The distance your animation travels. Set as as string so you can use vw, vh, em , rem, etc.

  • opacityDelay (float) [default: 0] The amount of delay in ms for the 'opacity' property.

  • perspective (boolean) [default: false] Whether your animation uses CSS 3D perspective.

  • perspectiveFOV (integer) [default: 1000] This prop sets the perspective (in px) property of your animation. (This requires the 'perspective' prop be set to 'true')

  • perspectiveX (integer) [default: 0] This prop sets the rotateX() property of your animation. (This requires the 'perspective' prop be set to 'true')

  • perspectiveY (integer) [default: 0] This prop sets the rotateY() property of your animation. (This requires the 'perspective' prop be set to 'true')

  • perspectiveZ (integer) [default: 0] This prop sets the rotateZ() property of your animation. (This requires the 'perspective' prop be set to 'true')

<Reveal /> Specific Properties

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

  • copy (children)
    This can be any valid jsx.

<WordReveal /> Specific Properties

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

  • copy (array<string>)
    The copy to be animated. Separate array values represent new lines (\n).

  • multilineMasking (boolean) [default: false] Whether each line of your animation should be masked out by its boundary box.

  • multilineOffsetDelay (integer) [default: 200]
    The time delay (in ms) between each separate line of your animation.

  • wordOffsetDelay (integer) [default: 200]
    The time delay (in ms) between each separate word of your animation.

<MultilineReveal /> Specific Properties

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

  • copy (array<string>)
    The copy to be animated. Separate array values represent new lines (\n).

  • multilineMasking (boolean) [default: false] Whether each line of your animation should be masked out by its boundary box.

  • multilineOffsetDelay (integer) [default: 200]
    The time delay (in ms) between each separate line of your animation.

<CharacterReveal /> Specific Properties

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

  • copy (array<string>)
    The copy to be animated. Separate array values represent new lines (\n).

  • multilineMasking (boolean) [default: false]
    Whether each line of your animation should be masked out by its boundary box.

  • multilineOffsetDelay (integer) [default: 200]
    The time delay (in ms) between each separate line of your animation.

  • characterOffsetDelay (integer) [default: 25]
    The time delay (in ms) between each separate character of your animation.

  • characterWordSpacing (string) [default: '.15em']
    The space between the words of each line. (Normal css text styling doesn't work properly, so spacing must be added manually.)

Contributing

I'd love that.