• Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    JavaScript
  • Created almost 8 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

✨ A small react library for animating the revealing of text.

React Reveal Text

npm dependencies travis bithound license

A small react library for animating the revealing of text.

gif animation

Demo/Tutorial available here: https://adrianmcli.github.io/react-reveal-text/

The demo page was built with React Storybook.

Features 🎉

  • Simple – Just plain ol' CSS transition animations.
  • Zero dependencies – Keeping it light and lit up!
  • Flexible – Choose your own easing function and timing.
  • Customizable – Customize and theme like a regular div.
  • Dynamic – Intelligent generation of random transition delay numbers.

Getting Started

  1. Install:
npm install --save react-reveal-text
  1. Use:
<ReactRevealText>WELCOME!</ReactRevealText>

API

Interactive docs with live-editable props here.

This component has many props that you can manipulate; below is a list of all of them.

Note that the component only re-renders when the show property has been changed.

Basic Properties

  • text (string)
    You can set the text either by passing in text as children or by using the text property.

  • show (boolean)
    This prop allows you to control what state the component is in. It allows you to hide or reveal the text.

  • className (string)
    This prop allows you to set the className for the div surrounding the text.

  • style (object)
    This prop allows you to pass in styles for the div surrounding the text.

Transition Properties

Each letter has its own randomly generated delay before its transition begins.

  • transitionTime (integer) [default: 1300]
    The time it takes for each letter's transition.

  • timingFunction (string) [default: 'linear']
    The CSS transition-timing-function property. On this page, you are given a dropdown selection, but in practice (and in the sandbox), you can enter in any valid string.

  • delayMin (integer) [default: 200]
    The minimum allowable delay before the transition for a letter is to begin.

  • delayMax (integer) [default: 1200]
    The maximum allowable delay before the transition for a letter is to begin.

  • threshold (float) [default: 0.2]
    The difference between the random numbers generated for each letter compared to the previous letter. Setting this higher will force the delays to be very different between each letter, spreading out the effect. Setting this lower will allow delays to be similar between letters, sometimes creating a chunking effect.

Contributing

This project was built using my two other tools: React Build Lib and React Build Dist. These tools are still very early in development, so if you are building these libraries, you may encounter some bugs. PRs and issues are welcomed and encouraged! Should probably add some testing too.

More Repositories

1

eth95

🛠️ A smart contract UI for your Ethereum dapp project
TypeScript
527
star
2

web3-vs-ethers

A basic cheatsheet of Web3.js vs Ethers (along w/ example apps!)
JavaScript
377
star
3

react-rotating-text

📝 A simple react component to display an array of words/sentences with a typewriter effect.
JavaScript
223
star
4

truffle-next

🛰️ A boilerplate Truffle Box project with Next.js for rapid Ethereum Dapp development
JavaScript
194
star
5

dapp-boilerplate

⚡A minimal types-first boilerplate for Ethereum frontend dapp development.
TypeScript
112
star
6

omg-counters

😍 Increment decrement counters using various frontend frameworks.
48
star
7

truffle-react

⚛️ A boilerplate Truffle Box project with Create React App for rapid Ethereum Dapp development
JavaScript
46
star
8

firebase-nextjs-example

An example app for using firebase with Next.js
JavaScript
19
star
9

js-state-encapsulation

Examples of state encapsulation in Javascript
JavaScript
19
star
10

ganache-jest-example

🚀 Minimal Solidity contract testing with Ganache and Jest
JavaScript
15
star
11

next-boilerplate

📐 A modern universal boilerplate for React applications using Next.js.
JavaScript
14
star
12

styled-mui-next

An example application of using Styled-Components and Next.js with Material-UI
JavaScript
13
star
13

drizzle-react-from-scratch

Trying to learn Drizzle by making projects with it from scratch
JavaScript
9
star
14

react-build-dist

A simple utility for compiling your React components to standalone modules.
JavaScript
9
star
15

rehydrate-workshop

A small collection of basic components built with Rehydrate 💧.
OCaml
7
star
16

simple-js-blockchain

🔗 A simple JS blockchain using only Flow types and functions
JavaScript
6
star
17

ethbtc-example

JavaScript
5
star
18

with-redux-combineReducers

JavaScript
3
star
19

react-build-lib

A simple utility for compiling your React components to CommonJS modules.
JavaScript
3
star
20

nextjs-symlink-bug

JavaScript
3
star
21

olis

A collaborative chat platform for the web built with Meteor and React
JavaScript
3
star
22

hodlbuddy

A script for me to see how much my cryptocurrency portfolio is worth
JavaScript
2
star
23

nouns.run

TypeScript
2
star
24

zenith

🌌 A better API wallet for ZenCash
JavaScript
2
star
25

meta-auth-example

An example usage of MetaAuth with a React frontend and an Express backend
JavaScript
2
star
26

create-react-app-brunch

Create simple configurable React apps with a Brunch-based CLI.
JavaScript
2
star
27

simple-express-jest

A simple ExpressJS and Jest starter project for absolute beginners
JavaScript
2
star
28

learn-more-cs

A simple project for us to track and manage our learning of certain computer science principles.
2
star
29

dev-react-component

A minimalistic boilerplate for publishing a React component to NPM.
JavaScript
2
star
30

twilio-sms-verification-example

A minimalistic example of SMS verification with Twilio using a React app and a Node server.
JavaScript
1
star
31

web3-CI-bug

1
star
32

simple-zap

An attempt to demonstrate a simple zap contract
Solidity
1
star
33

hangtight.club

🎟️ A queue ticketing system for Nounish events!
Solidity
1
star
34

consensys-rxjs-talk

Example project for my RxJS talk w/ ConsenSys (along w/ a Drizzle-Utils demo)
JavaScript
1
star
35

practice-typing

A simple Angular 2 app to help people practice typing phrases on their keyboard.
TypeScript
1
star
36

track-page-requests

A node.js script for tracking page requests
JavaScript
1
star
37

repro-ganache-bug

JavaScript
1
star
38

defi-experiments

TypeScript
1
star
39

web3-CI-bug-npm

1
star
40

cruise-reviews

JavaScript
1
star
41

lookintodefi

1
star
42

hackernews-node

TypeScript
1
star
43

bc-parks

JavaScript
1
star
44

repro-eth-block-tracker-bug

JavaScript
1
star
45

non-overwhelming-zkp

1
star
46

decoder-import-bug

JavaScript
1
star
47

buidler-deploy-repro

A reproduction repo of buidler deploy not showing contract addresses for a local deploy
JavaScript
1
star