šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

react-simple-rotating-text

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-rotating-text

> A simple rotating animation text component

0.0.6
npm
Version published
Weekly downloads
50
31.58%
Maintainers
0
Weekly downloads
Ā 
Created
Source

react-simple-rotating-text

A simple rotating animation text component

NPM JavaScript Style Guide

Demo gif

Install

npm install --save react-simple-rotating-text

Usage

Basic

import React, { Component } from 'react'
import { RotatingText } from 'react-simple-rotating-text'
import 'react-simple-rotating-text/dist/index.css'

class Example extends Component {
  render() {
    return <RotatingText texts={['hello', 'world']} />
  }
}

Custom colors

import React, { Component } from 'react'
import { RotatingText } from 'react-simple-rotating-text'
import 'react-simple-rotating-text/dist/index.css'

class Example extends Component {
  render() {
    return <RotatingText texts={['hello', 'world']}
      colors={['red', 'blue']}
    />
  }
}

Custom background colors

import React, { Component } from 'react'
import { RotatingText } from 'react-simple-rotating-text'
import 'react-simple-rotating-text/dist/index.css'

class Example extends Component {
  render() {
    return <RotatingText texts={['hello', 'world']}
      backgroundColors={['red', 'blue']}
    />
  }
}

Animations

Fade

import React, { Component } from 'react'
import { RotatingText } from 'react-simple-rotating-text'
import 'react-simple-rotating-text/dist/index.css'

class Example extends Component {
  render() {
    return <RotatingText texts={['hello', 'world']}
      animation='fade'
    />
  }
}

Slide

import React, { Component } from 'react'
import { RotatingText } from 'react-simple-rotating-text'
import 'react-simple-rotating-text/dist/index.css'

class Example extends Component {
  render() {
    return <RotatingText texts={['hello', 'world']}
      animation='slide'
      direction='vertical'
    />
  }
}

Scale

import React, { Component } from 'react'
import { RotatingText } from 'react-simple-rotating-text'
import 'react-simple-rotating-text/dist/index.css'

class Example extends Component {
  render() {
    return <RotatingText texts={['hello', 'world']}
      animation='scale'
    />
  }
}

Properties

properydescriptionrequireddefaultallowed values
textsAn array of stringstrue
colorsAn array of strings of colorsfalsehex code of color
backgroundColorsAn array of strings of background colorsfalsehex code of color
duratrionduration of the animationfalse2.5snumber
animationname of the animationfalsefadefade, slide, scale
directiondirection of animationfalseverticalhorzontal or vertical
classNameCustom classes for stylingfalse

License

MIT Ā© dilpreetsio

Keywords

react

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts