0.2.2 • Published 4 years ago

theme-ui-glitch-text v0.2.2

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

Theme-UI Glitch Text

React component for adding glitch text effect. Component won't be animated if prefers-reduced-motion media query is set to reduce.

API

PropDefaultDescription
text""::before and ::after text
duration5000msAnimation duration
limit0.5Amount of glitch effect
keyframesNum20Number of keyframes
position[-5, 5]Amount of left and right offset
shadow[-2, 2]Amount of left and right text-shadow
colors['red', 'green', 'blue']Text shadow colors
backgroundColor#fffBackground color

Example

<GlitchText
  text="Theme-UI Glitch Text"
  duration="5000ms"
  keyframesNum={30}
  limit={1}
  colors={['pink', 'orange', 'purple']}
  position={[-2, 2]}
  shadow={[-1, 1]}
  backgroundColor="background"
>
  Theme-UI Glitch Text
</GlitchText>