Pulse Pair
cellforge/cell-orbit-18FreeComponent
Mirrored braille dot pairs pulse from top and bottom toward the center, with a connective center-column accent.
Install it
npx shadcn@latest add https://cellforge.dev/r/cell-orbit-18.jsonSource
1"use client";23import { useMemo } from "react";45import { CellForgeBase } from "@/components/ui/cellforge-core";6import { useCellForgePhases } from "@/components/ui/cellforge-hooks";7import { isWithinCircularMask } from "@/components/ui/cellforge-core";8import { useCyclePhase } from "@/components/ui/cellforge-hooks";9import { usePrefersReducedMotion } from "@/components/ui/cellforge-hooks";10import type { DotAnimationResolver, CellForgeCommonProps } from "@/components/ui/cellforge-core";1112export type CellOrbit18Props = CellForgeCommonProps;1314const BASE_OPACITY = 0.07;15const MID_OPACITY = 0.33;16const HIGH_OPACITY = 0.95;1718export function CellOrbit18({19 speed = 1.75,20 animated = true,21 hoverAnimated = false,22 ...rest23}: CellOrbit18Props) {24 const reducedMotion = usePrefersReducedMotion();25 const { phase: matrixPhase, onMouseEnter, onMouseLeave } = useCellForgePhases({26 animated: Boolean(animated && !reducedMotion),27 hoverAnimated: Boolean(hoverAnimated && !reducedMotion),28 speed29 });30 const animPhase = useCyclePhase({31 active: !reducedMotion && matrixPhase !== "idle",32 cycleMsBase: 1550,33 speed34 });3536 const resolver = useMemo<DotAnimationResolver>(() => {37 return ({ row, col, phase }) => {38 if (!isWithinCircularMask(row, col)) {39 return { className: "dmx-inactive" };40 }4142 const t = reducedMotion || phase === "idle" ? 0 : Math.floor((animPhase) * 6);43 const pulseRow = t % 3; // 0..244 const topRow = pulseRow;45 const bottomRow = 4 - pulseRow;46 const pairCols = [1, 3];4748 let opacity = BASE_OPACITY;49 if ((row === topRow || row === bottomRow) && pairCols.includes(col)) {50 opacity = HIGH_OPACITY;51 } else if ((row === topRow || row === bottomRow) && col === 2) {52 opacity = 0.58;53 } else if ((row === 2 || col === 2) && pairCols.includes(col) === false) {54 opacity = MID_OPACITY;55 } else if (pairCols.includes(col)) {56 opacity = 0.22;57 }5859 return { style: { opacity } };60 };61 }, [reducedMotion, animPhase]);6263 return (64 <CellForgeBase65 {...rest}66 size={rest.size ?? 36}67 dotSize={rest.dotSize ?? 5}68 speed={speed}69 pattern="full"70 animated={animated}71 phase={matrixPhase}72 onMouseEnter={onMouseEnter}73 onMouseLeave={onMouseLeave}74 reducedMotion={reducedMotion}75 animationResolver={resolver}76 />77 );78}
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 |
