GitXplorerGitXplorer
i

rotating-text

public
13 stars
3 forks
0 issues

Commits

List of commits on branch main.
Verified
fb554eefb17e07e33e016b350f5acf8d926cc366

Update page.tsx

iiteratetograceness committed a year ago
Verified
aae373e9243c6fa656b23993a082b6d22c7c5dac

Merge pull request #1 from HolaSoyGonZzA/main

iiteratetograceness committed 2 years ago
Unverified
9c2b84ab81fed01daa9629b06d22e36a7e6289c1

clean up deps

iiteratetograceness committed 2 years ago
Unverified
eb8f08e1212418889baa5b0ea44e0fdbaa4346ea

oops

iiteratetograceness committed 2 years ago
Unverified
46d7db7732e40aaf2d754236b7805f294a12fe40

add analytics

iiteratetograceness committed 2 years ago
Unverified
54606560d37a7d28241768d954432f790b45346f

update og image

iiteratetograceness committed 2 years ago

README

The README file for this repository.

Rotating Text

Customizable 3D text hover animation. Created using Framer Motion. Respects user's Reduced Motion preferences. Visit the demo here, optimized for Desktop.

Install

npm install --save rotating-text

Usage

text updates the content, ignoring spaces. stagger gives you control over the time between each letter. timing sets the duration of each letter animation. Timing can be a single numeric value OR a custom timing array, with a specific duration for each letter in the text (e.g. if text is OKAY, your custom timing array can look like [0.1, 0.4, 0.5, 0.1]).

You can use className and style to add further customization and styling.

import React, { Component } from 'react'

import RotatingText from 'rotating-text'
import 'rotating-text/dist/index.css'

function MyApp {
  return (
    <RotatingText
      text="HOVERME"
      stagger={0.1}
      timing={0.5}
      className="rotating-text"
      styles={{ fontSize: '100px' }}
    />
  )
}

Notes

  1. Text wrapping is currently not supported. RotatingText works best with a single word or short phrase, as spaces are ignored.

License

MIT © jueungrace