For Tailwind CSS v3 docs, click here.

Text Glitch

Creates a vibrant glitch effect on text with customizable speed, shadow colors, and optional hover-triggered animation.

API

Prop NameTypeDefaultDescription
textstring""The text content to display with the glitch effect.
speednumber0.5Controls the animation speed of the glitch effect in seconds.
enableShadowsbooleantrueToggles colored shadows that enhance the glitch look.
enableOnHoverbooleanfalseIf true, glitch animation activates only on hover.
classstringundefinedAdditional CSS classes for the container div.

Install using CLI

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://registry.inspira-ui.com/text-glitch.json"

Install Manually

Copy and paste the following code:

TextGlitch.vue

Features

  • Stylish glitch animation: Text appears with vibrant RGB channel shifts and clipping.
  • Configurable speed: Easily adjust animation timing via speed prop.
  • Shadow control: Enable or disable colored shadows for stronger glitch effect.
  • Hover-triggered option: Activate glitch only on mouse hover to reduce distraction.
  • Responsive sizing: Font size scales smoothly across screen sizes using clamp().

Credits