BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/@cellforge/cell-angle-3

Corner Bounce

cellforge/cell-angle-3
FreeComponent

A single head bounces between triangle corners along the perimeter path with a short fading tail.

Install it

npx shadcn@latest add https://cellforge.dev/r/cell-angle-3.json

Source

components/ui/cell-angle-3.tsxcellforge.dev/r/cell-angle-3.json
1"use client";
2
3import type { CSSProperties } from "react";
4
5import { cx } from "@/components/ui/cellforge-core";
6import { resolveDmxColorTokens } from "@/components/ui/cellforge-core";
7import { useCellForgePhases } from "@/components/ui/cellforge-hooks";
8import { styleOpacity, stylePx } from "@/components/ui/cellforge-core";
9import { remapOpacityToTriplet } from "@/components/ui/cellforge-core";
10import { dmxBloomHaloSpreadClass, dmxBloomRootActive, dmxDotBloomParts } from "@/components/ui/cellforge-core";
11import { usePrefersReducedMotion } from "@/components/ui/cellforge-hooks";
12import { useSteppedCycle } from "@/components/ui/cellforge-hooks";
13import type { CellForgeCommonProps } from "@/components/ui/cellforge-core";
14
15export type CellAngle3Props = CellForgeCommonProps;
16
17const MATRIX_SIZE = 7;
18const STEP_COUNT = 36;
19const BASE_OPACITY = 0.03;
20const MID_OPACITY = 0.07;
21const HIGH_OPACITY = 0.94;
22const FAR_OPACITY = 0.15;
23
24const TRIANGLE_CELLS = new Set([
25 "1,3",
26 "2,2",
27 "2,4",
28 "3,1",
29 "3,3",
30 "3,5",
31 "4,0",
32 "4,2",
33 "4,4",
34 "4,6"
35]);
36
37function isWithinTriangleMask(row: number, col: number): boolean {
38 if (row < 0 || row >= MATRIX_SIZE || col < 0 || col >= MATRIX_SIZE) {
39 return false;
40 }
41
42 return TRIANGLE_CELLS.has(`${row},${col}`);
43}
44
45export function CellAngle3({
46 size = 30,
47 dotSize = 6.5,
48 color = "currentColor",
49 colorPreset,
50 ariaLabel = "Loading",
51 className,
52 muted = false,
53 bloom = false,
54 halo = 0,
55 dotClassName,
56 dotShape = "circle",
57 speed = 1.45,
58 animated = true,
59 hoverAnimated = false,
60 cellPadding,
61 opacityBase,
62 opacityMid,
63 opacityPeak
64}: CellAngle3Props) {
65 const reducedMotion = usePrefersReducedMotion();
66 const { phase: matrixPhase, onMouseEnter, onMouseLeave } = useCellForgePhases({
67 animated: Boolean(animated && !reducedMotion),
68 hoverAnimated: Boolean(hoverAnimated && !reducedMotion),
69 speed
70 });
71 const step = useSteppedCycle({
72 active: !reducedMotion && matrixPhase !== "idle",
73 cycleMsBase: 1650,
74 steps: STEP_COUNT,
75 speed,
76 });
77
78 const frame = reducedMotion || matrixPhase === "idle" ? 0 : step;
79 const theta = (frame / STEP_COUNT) * Math.PI * 2;
80 const sweepX = Math.cos(theta);
81 const sweepY = Math.sin(theta);
82 const ambientPulse = 0.5 - 0.5 * Math.cos(theta);
83
84 const gap =
85 cellPadding ?? Math.max(1, Math.floor((size - dotSize * MATRIX_SIZE) / (MATRIX_SIZE - 1)));
86 const matrixSize = dotSize * MATRIX_SIZE + gap * (MATRIX_SIZE - 1);
87// … truncated

Facts

Registry
@cellforge
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

cellforge.dev cellforge-dev/cellforge on GitHub Raw registry item This item as JSON

More from @cellforge

All 71 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
All CellForge Loadersall@cellforgeComponentsFreeno deps
Core Spokescell-angle-1@cellforgeComponentsFreeno deps
Column Rakecell-angle-10@cellforgeComponentsFreeno deps
Shelf Descentcell-angle-11@cellforgeComponentsFreeno deps
Skew Driftcell-angle-12@cellforgeComponentsFreeno deps
Serpent Zipcell-angle-13@cellforgeComponentsFreeno deps
Pillar Sweepcell-angle-14@cellforgeComponentsFreeno deps
Tripod Handoffcell-angle-15@cellforgeComponentsFreeno 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