Glyph Cluster
dotmatrix/dotm-circular-15FreeComponent
Braille-inspired grouped dot motifs cycle through rails, bridges, and cross forms inside the circular mask with crisp tiered opacity.
Install it
npx shadcn@latest add https://dotmatrix.zzzzshawn.cloud/r/dotm-circular-15.jsonSource
1"use client";23import { useMemo } from "react";45import { DotMatrixBase } from "@/components/ui/dotmatrix-core";6import { useDotMatrixPhases } from "@/components/ui/dotmatrix-hooks";7import { isWithinCircularMask } from "@/components/ui/dotmatrix-core";8import { useCyclePhase } from "@/components/ui/dotmatrix-hooks";9import { usePrefersReducedMotion } from "@/components/ui/dotmatrix-hooks";10import type { DotAnimationResolver, DotMatrixCommonProps } from "@/components/ui/dotmatrix-core";1112export type DotmCircular15Props = DotMatrixCommonProps;1314const STEP_COUNT = 24;15const BASE_OPACITY = 0.07;16const MID_OPACITY = 0.34;17const HIGH_OPACITY = 0.95;1819const BRAILLE_PHASES: ReadonlyArray<ReadonlySet<string>> = [20 new Set(["1,1", "2,1", "3,1", "1,3", "2,3", "3,3"]), // rails21 new Set(["1,1", "2,1", "3,1", "2,2", "1,3", "2,3", "3,3"]), // center bridge22 new Set(["1,1", "1,2", "1,3", "2,1", "2,3", "3,1", "3,2", "3,3"]), // top+bottom bars23 new Set(["1,1", "3,1", "2,2", "1,3", "3,3"]), // X-cross24 new Set(["2,1", "1,2", "3,2", "2,3"]), // plus motif25 new Set(["1,1", "2,1", "2,2", "2,3", "3,3"]) // diagonal sweep26];2728export function DotmCircular15({29 speed = 1.65,30 animated = true,31 hoverAnimated = false,32 ...rest33}: DotmCircular15Props) {34 const reducedMotion = usePrefersReducedMotion();35 const { phase: matrixPhase, onMouseEnter, onMouseLeave } = useDotMatrixPhases({36 animated: Boolean(animated && !reducedMotion),37 hoverAnimated: Boolean(hoverAnimated && !reducedMotion),38 speed39 });40 const animPhase = useCyclePhase({41 active: !reducedMotion && matrixPhase !== "idle",42 cycleMsBase: 1680,43 speed44 });4546 const resolver = useMemo<DotAnimationResolver>(() => {47 return ({ row, col, phase }) => {48 if (!isWithinCircularMask(row, col)) {49 return { className: "dmx-inactive" };50 }5152 const x = col - 2;53 const y = row - 2;54 const ring = Math.sqrt(x * x + y * y);55 const count = BRAILLE_PHASES.length;56 const phaseIndex =57 reducedMotion || phase === "idle"58 ? 059 : (() => {60 const t = Number.isFinite(animPhase) ? animPhase : 0;61 const raw = Math.floor(t * count);62 return ((raw % count) + count) % count;63 })();64 const activePattern = BRAILLE_PHASES[phaseIndex]!;65 const key = `${row},${col}`;66 const inPattern = activePattern.has(key);6768// … truncated
More from @dotmatrix
All 91 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| All Dot Matrix Loadersall | @dotmatrix | Components | Free | no deps | |
| Square Spiraldotm-3x3-1 | @dotmatrix | Components | Free | no deps | |
| Frame Chasedotm-3x3-10 | @dotmatrix | Components | Free | no deps | |
| Glyph Pulsedotm-3x3-11 | @dotmatrix | Components | Free | no deps | |
| Drop Rippledotm-3x3-12 | @dotmatrix | Components | Free | no deps | |
| Right Surgedotm-3x3-13 | @dotmatrix | Components | Free | no deps | |
| Comet Traildotm-3x3-14 | @dotmatrix | Components | Free | no deps | |
| Echo Ringsdotm-3x3-15 | @dotmatrix | Components | Free | no deps |
