UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "glyph-matrix-demo",
"type": "registry:example",
"title": "Glyph Matrix Demo",
"description": "Example showing an animated grid of subtly shifting glyphs.",
"dependencies": [
"next-themes"
],
"registryDependencies": [
"@magicui/glyph-matrix"
],
"files": [
{
"path": "registry/example/glyph-matrix-demo.tsx",
"content": "\"use client\"\n\nimport { useEffect, useState } from \"react\"\nimport { useTheme } from \"next-themes\"\n\nimport { GlyphMatrix } from \"@/registry/magicui/glyph-matrix\"\n\nexport default function GlyphMatrixDemo() {\n const { resolvedTheme } = useTheme()\n // Start neutral so the first frame is visible in both themes, then adopt\n // the resolved theme color once it's known.\n const [color, setColor] = useState(\"#6B7280\")\n\n useEffect(() => {\n if (!resolvedTheme) return\n setColor(resolvedTheme === \"dark\" ? \"#ffffff\" : \"#000000\")\n }, [resolvedTheme])\n\n return (\n <div className=\"border-border bg-background relative h-[400px] w-full overflow-hidden rounded-lg border\">\n <GlyphMatrix\n glyphs=\"01·•+*/\\<>=\"\n cellSize={14}\n mutationRate={0.04}\n interval={90}\n fadeBottom={0.6}\n color={color}\n />\n </div>\n )\n}\n",
"type": "registry:example"
}
]
}