This component no longer exists. It was in componentry’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-14 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Dithered Logo
componentry/dithered-logoRemovedComponent
An interactive particle logo that turns image assets into a dithered canvas field with cursor ripples.
Live preview
live · rendered by the registry
Rendered by componentry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://componentry.dev/r/dithered-logo.jsonSource
1"use client";23import { cn } from "@/lib/utils";4import { type CSSProperties, useEffect, useRef } from "react";56export interface DitheredLogoProps {7 imageSrc: string;8 gridSize?: number;9 scale?: number;10 dotScale?: number;11 invert?: boolean;12 cornerRadius?: number;13 threshold?: number;14 contrast?: number;15 gamma?: number;16 blur?: number;17 diffusionStrength?: number;18 serpentine?: boolean;19 particleColor?: string;20 style?: CSSProperties;21 className?: string;22}2324type PointCloud = {25 x: Float32Array;26 y: Float32Array;27 dx: Float32Array;28 dy: Float32Array;29 dotSize: number;30};3132type Wave = { x: number; y: number; bornAt: number };3334const defaults = {35 gridSize: 200,36 scale: 0.5,37 dotScale: 1,38 invert: true,39 cornerRadius: 0.2,40 threshold: 180,41 contrast: 0,42 gamma: 1,43 blur: 3.75,44 diffusionStrength: 1,45 serpentine: true,46};4748function loadAsset(source: string, signal: AbortSignal) {49 return new Promise<HTMLImageElement>((resolve, reject) => {50 const image = new Image();51 const abort = () => reject(new DOMException("Aborted", "AbortError"));52 image.crossOrigin = "anonymous";53 image.onload = () => {54 signal.removeEventListener("abort", abort);55 resolve(image);56 };57 image.onerror = () => reject(new Error(`Unable to load image: ${source}`));58 signal.addEventListener("abort", abort, { once: true });59 image.src = source;60 });61}6263function sampleImage(64 image: HTMLImageElement,65 maxDimension: number,66 contrast: number,67 gamma: number,68 blur: number,69) {70 const ratio = image.naturalWidth / image.naturalHeight;71 const width = Math.max(72 1,73 Math.round(ratio >= 1 ? maxDimension : maxDimension * ratio),74 );75 const height = Math.max(76 1,77 Math.round(ratio >= 1 ? maxDimension / ratio : maxDimension),78 );79 const canvas = document.createElement("canvas");80 canvas.width = width;81 canvas.height = height;82 const context = canvas.getContext("2d", { willReadFrequently: true });83 if (!context) throw new Error("DitheredLogo could not create a 2D context.");8485 context.clearRect(0, 0, width, height);86 context.filter = blur > 0 ? `blur(${blur}px)` : "none";87 context.drawImage(image, 0, 0, width, height);88 context.filter = "none";8990 const pixels = context.getImageData(0, 0, width, height).data;91 const luminance = new Float32Array(width * height);92 const alpha = new Uint8Array(width * height);93 const contrastScale =94// … truncated
More from componentry
All 35 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| animated-gradientanimated-gradient | componentry | Components | Unverified | no deps | |
| auth-modalauth-modal | componentry | Components | Unverified | no deps | |
| border-beamborder-beam | componentry | Components | Unverified | no deps | |
| circuit-boardcircuit-board | componentry | Components | Unverified | no deps | |
| closing-plasmaclosing-plasma | componentry | Components | Unverified | no deps | |
| collection-surfercollection-surfer | componentry | Components | Unverified | no deps | |
| command-menucommand-menu | componentry | Components | Unverified | no deps | |
| cursor-driven-particle-typographycursor-driven-particle-typography | componentry | Components | Unverified | no deps |
