/glitch-text

This nice and simple (1kB) react component can help you add text glitch animation and have some really cool themes, like orange glitch or blue glitch ๐Ÿ”ฎ

Primary LanguageSCSSMIT LicenseMIT

NPM JavaScript Style Guide NPM npm GitHub stars npm bundle size

Glitch text for react ๐Ÿ”ฎ

2022-06-12.15-20-38.mp4

This nice and simple (1kB) react component can help you add text glitch animation and have some really cool themes, like orange glitch or blue glitch

The glitch is really smooth, I tried to make more distortion but it's looked awful


Install ๐Ÿ’ก:

npm i glitch-text
---
yarn add glitch-text

Usage ๐Ÿ”ฅ:

// don't forget change props
import { GlitchText } from 'glitch-text';

 // orange theme by default 
const App = () => {
  return (
    <div style={{ fontSize: '70px' }}>
     
      <GlitchText theme='orange' text={'There are your text'} />

    </div>
  );
};

Text fully customazible but try use parents tags for styling

I'm recommend use 50px - 100px range for more beauty effect


Themes ๐ŸŽจ (more coming soon):

  • orange - (by default)
  • blue
  • green
  • red
  • white
  • purple

Examples ๐Ÿงค (hover on text):



Props ๐Ÿ”ง:

props required default description
text(string) yes - text where you want use glitch animation
theme(string) yes orange glitch color

npm - https://www.npmjs.com/package/glitch-text