Glitch Text
kokonut-ui/glitch-textFreeComponent
Why not?
Live preview
live · rendered by the registry
Rendered by kokonut-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://kokonutui.com/r/glitch-text.jsonSource
1"use client";23/**4 * @author: @dorianbaffier5 * @description: Glitch Text6 * @version: 1.0.07 * @date: 2025-06-268 * @license: MIT9 * @website: https://kokonutui.com10 * @github: https://github.com/kokonut-labs/kokonutui11 */1213import { motion } from "motion/react";14import { useRef } from "react";15import { cn } from "@/lib/utils";1617interface GlitchTextProps {18 text: string;19 className?: string;20 glitchIntensity?: "light" | "medium" | "heavy" | "extreme";21 color?:22 | "rainbow"23 | "blue"24 | "purple"25 | "cyan"26 | "pink"27 | "orange"28 | "gradient-orange";29 backgroundColor?: string;30 isStatic?: boolean;31 size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | number;32 fontWeight?: number;33 letterSpacing?: number;34}3536const GlitchText = ({37 text = "Glitch Text",38 className,39 glitchIntensity = "medium",40 color = "gradient-orange",41 backgroundColor,42 isStatic = false,43 size = "md",44 fontWeight = 700,45 letterSpacing = 5,46}: GlitchTextProps) => {47 const containerRef = useRef<HTMLDivElement>(null);4849 // Vibrant color schemes50 const colorSchemes = {51 rainbow: {52 primary: "oklch(0.85 0.2 var(--rainbow-hue, 270))",53 before: "oklch(0.9 0.15 calc(var(--rainbow-hue, 270) + 60))",54 after: "oklch(0.8 0.25 calc(var(--rainbow-hue, 270) - 60))",55 },56 blue: {57 primary: "oklch(0.65 0.2 250)", // Vibrant blue58 before: "oklch(0.75 0.15 255)", // Lighter blue59 after: "oklch(0.55 0.25 245)", // Deeper blue60 },61 purple: {62 primary: "oklch(0.6 0.22 290)", // Rich purple63 before: "oklch(0.7 0.18 295)", // Lighter purple64 after: "oklch(0.5 0.25 285)", // Deep purple65 },66 cyan: {67 primary: "oklch(0.8 0.15 200)", // Bright cyan68 before: "oklch(0.85 0.12 205)", // Light cyan69 after: "oklch(0.7 0.18 195)", // Deep cyan70 },71 pink: {72 primary: "oklch(0.7 0.25 330)", // Vibrant pink73 before: "oklch(0.8 0.2 335)", // Light pink74 after: "oklch(0.6 0.28 325)", // Deep pink75 },76 orange: {77 primary: "oklch(0.7 0.25 45)", // Vibrant tangerine orange78 before: "oklch(0.85 0.2 40)", // Warm light orange79 after: "oklch(0.6 0.28 50)", // Deep sunset orange80 },81 "gradient-orange": {82 primary:83 "linear-gradient(135deg, oklch(0.7 0.25 45) 0%, oklch(0.75 0.28 30) 50%, oklch(0.65 0.3 60) 100%)",84 before:85 "linear-gradient(135deg, oklch(0.85 0.2 40) 0%, oklch(0.8 0.22 25) 50%, oklch(0.75 0.25 55) 100%)",86 after:87// … truncated
What it pulls in
npm packages
Files it writes
More from kokonut-ui
All 40 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Action Search Baraction-search-bar | kokonut-ui | Components | Free | 2 deps · 2 files | |
| AI Input Searchai-input-search | kokonut-ui | Components | Free | 1 dep · 2 files | |
| AI State Loadingai-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Input Selectorai-prompt | kokonut-ui | Components | Free | 2 deps · 4 files | |
| AI Text Loadingai-text-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Voiceai-voice | kokonut-ui | Components | Free | 2 deps | |
| Apple Activity Cardapple-activity-card | kokonut-ui | Components | Free | 1 dep | |
| Magnet Buttonattract-button | kokonut-ui | Components | Free | 2 deps |
