Hollow Shell
cellforge/cell-angle-18FreeComponent
The heart cell stays locked dim while every other triangle dot breathes together in phase — a hollow, ring-like pulse.
Install it
npx shadcn@latest add https://cellforge.dev/r/cell-angle-18.jsonSource
1"use client";23import type { CSSProperties } from "react";45import { 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 { dmxBloomRootActive, dmxDotBloomParts } from "@/components/ui/cellforge-core";11import { useCyclePhase } from "@/components/ui/cellforge-hooks";12import { usePrefersReducedMotion } from "@/components/ui/cellforge-hooks";13import type { CellForgeCommonProps } from "@/components/ui/cellforge-core";1415export type CellAngle18Props = CellForgeCommonProps;1617const MATRIX_SIZE = 7;1819const CORE_DIM = 0.1;20const SHELL_LOW = 0.22;21const SHELL_HIGH = 0.96;2223const TRIANGLE_CELLS = new Set([24 "1,3",25 "2,2",26 "2,4",27 "3,1",28 "3,3",29 "3,5",30 "4,0",31 "4,2",32 "4,4",33 "4,6"34]);3536function isWithinTriangleMask(row: number, col: number): boolean {37 if (row < 0 || row >= MATRIX_SIZE || col < 0 || col >= MATRIX_SIZE) {38 return false;39 }4041 return TRIANGLE_CELLS.has(`${row},${col}`);42}4344function smoothstep01(edge0: number, edge1: number, x: number): number {45 if (edge1 <= edge0) {46 return x >= edge1 ? 1 : 0;47 }48 const t = Math.max(0, Math.min(1, (x - edge0) / (edge1 - edge0)));49 return t * t * (3 - 2 * t);50}5152/**53 * Heart cell stays dim while the outer shell breathes in sync — inverted emphasis vs center-led54 * corona loaders.55 */56function opacityForCell(row: number, col: number, phase: number): number {57 if (row === 3 && col === 3) {58 return CORE_DIM;59 }6061 const breathe = 0.5 + 0.5 * Math.sin(phase * Math.PI * 2);62 const crest = smoothstep01(0.2, 0.94, breathe);63 return SHELL_LOW + crest * (SHELL_HIGH - SHELL_LOW);64}6566export function CellAngle18({67 size = 30,68 dotSize = 6.5,69 color = "currentColor",70 colorPreset,71 ariaLabel = "Loading",72 className,73 muted = false,74 bloom = false,75 halo = 0,76 dotClassName,77 dotShape = "circle",78 speed = 1.6,79 animated = true,80 hoverAnimated = false,81 cellPadding,82 opacityBase,83 opacityMid,84 opacityPeak85}: CellAngle18Props) {86 const reducedMotion = usePrefersReducedMotion();87 const { phase: matrixPhase, onMouseEnter, onMouseLeave } = useCellForgePhases({88 animated: Boolean(animated && !reducedMotion),89 hoverAnimated: Boolean(hoverAnimated && !reducedMotion),90 speed91 });92// … truncated
More from @cellforge
All 71 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| All CellForge Loadersall | @cellforge | Components | Free | no deps | |
| Core Spokescell-angle-1 | @cellforge | Components | Free | no deps | |
| Column Rakecell-angle-10 | @cellforge | Components | Free | no deps | |
| Shelf Descentcell-angle-11 | @cellforge | Components | Free | no deps | |
| Skew Driftcell-angle-12 | @cellforge | Components | Free | no deps | |
| Serpent Zipcell-angle-13 | @cellforge | Components | Free | no deps | |
| Pillar Sweepcell-angle-14 | @cellforge | Components | Free | no deps | |
| Tripod Handoffcell-angle-15 | @cellforge | Components | Free | no deps |
