BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/@dotmatrix/dotm-hex-5

Spiral Lattice

dotmatrix/dotm-hex-5
FreeComponent

Counter-rotating spiral waves cross through the hex lattice, creating a fast core pulse and softer outer wake.

Install it

npx shadcn@latest add https://dotmatrix.zzzzshawn.cloud/r/dotm-hex-5.json

Source

components/ui/dotm-hex-5.tsxdotmatrix.zzzzshawn.cloud/r/dotm-hex-5.json · first 6 KB
1"use client";
2
3import type { CSSProperties } from "react";
4
5import { cx } from "@/components/ui/dotmatrix-core";
6import { resolveDmxColorTokens } from "@/components/ui/dotmatrix-core";
7import { styleOpacity, stylePx } from "@/components/ui/dotmatrix-core";
8import { remapOpacityToTriplet } from "@/components/ui/dotmatrix-core";
9import { dmxBloomRootActive, dmxDotBloomParts } from "@/components/ui/dotmatrix-core";
10import { getPatternIndexes } from "@/components/ui/dotmatrix-core";
11import { useDotMatrixPhases } from "@/components/ui/dotmatrix-hooks";
12import { useCyclePhase } from "@/components/ui/dotmatrix-hooks";
13import { usePrefersReducedMotion } from "@/components/ui/dotmatrix-hooks";
14import type { DotMatrixCommonProps } from "@/components/ui/dotmatrix-core";
15
16export type DotmHex5Props = DotMatrixCommonProps;
17
18const ROW_COUNTS = [3, 4, 5, 4, 3] as const;
19const BASE_OPACITY = 0.08;
20const HIGH_OPACITY = 0.96;
21const HEX_ROW_PITCH_RATIO = Math.sqrt(3) / 2;
22
23function hexPatternIndex(row: number, rowCount: number, col: number): number {
24 return row * ROW_COUNTS[2] + Math.floor((ROW_COUNTS[2] - rowCount) / 2) + col;
25}
26
27function clamp01(n: number | undefined) {
28 if (n == null || !Number.isFinite(n)) {
29 return;
30 }
31 return Math.min(1, Math.max(0, n));
32}
33
34function pointForCell(row: number, col: number): { angle: number; radius: number } {
35 const count = ROW_COUNTS[row] ?? 1;
36 const x = col - (count - 1) / 2;
37 const y = (row - 2) * HEX_ROW_PITCH_RATIO;
38 return {
39 angle: Math.atan2(y, x),
40 radius: Math.sqrt(x * x + y * y)
41 };
42}
43
44function wavePeak(value: number): number {
45 const wrapped = ((value % 1) + 1) % 1;
46 return Math.max(0, 1 - Math.abs(wrapped * 2 - 1) / 0.55);
47}
48
49function opacityForCell(row: number, col: number, phase: number): number {
50 const { angle, radius } = pointForCell(row, col);
51 const spiral = phase + radius * 0.18 + angle / (Math.PI * 2);
52 const counterSpiral = phase * 0.72 - radius * 0.16 - angle / (Math.PI * 2);
53 const a = wavePeak(spiral);
54 const b = wavePeak(counterSpiral) * 0.55;
55 const core = radius < 0.1 ? 0.54 + Math.sin(phase * Math.PI * 4) * 0.26 : 0;
56
57 return Math.min(HIGH_OPACITY, BASE_OPACITY + a * 0.7 + b * 0.42 + core);
58}
59
60export function DotmHex5({
61 size = 34,
62 dotSize = 5,
63 color = "currentColor",
64 colorPreset,
65 ariaLabel = "Loading",
66 className,
67 muted = false,
68 bloom = false,
69 halo = 0,
70 dotClassName,
71 dotShape = "circle",
72 speed = 1.75,
73 animated = true,
74 hoverAnimated = false,
75// … truncated

Facts

Registry
@dotmatrix
Type
registry:ui
Access
Free
Files written
0
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

dotmatrix.zzzzshawn.cloud zzzzshawn/matrix on GitHub Raw registry item This item as JSON

More from @dotmatrix

All 91 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
All Dot Matrix Loadersall@dotmatrixComponentsFreeno deps
Square Spiraldotm-3x3-1@dotmatrixComponentsFreeno deps
Frame Chasedotm-3x3-10@dotmatrixComponentsFreeno deps
Glyph Pulsedotm-3x3-11@dotmatrixComponentsFreeno deps
Drop Rippledotm-3x3-12@dotmatrixComponentsFreeno deps
Right Surgedotm-3x3-13@dotmatrixComponentsFreeno deps
Comet Traildotm-3x3-14@dotmatrixComponentsFreeno deps
Echo Ringsdotm-3x3-15@dotmatrixComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex