BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/cult/ui/dither-image-demo-upload

dither-image-demo-upload

cult-ui/dither-image-demo-upload
UnverifiedComponent

cult/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/nolly-studio/cult-ui/HEAD/apps/www/dither-image-demo-upload.json

Source

registry/default/example/dither-image-demo-upload.tsxraw.githubusercontent.com/nolly-studio/cult-ui/HEAD/apps/www/dither-image-demo-upload.json · first 6 KB
1"use client"
2
3import {
4 useCallback,
5 useEffect,
6 useId,
7 useRef,
8 useState,
9 type ChangeEvent,
10 type DragEvent,
11 type ReactNode,
12} from "react"
13
14import { cn } from "@/lib/utils"
15import { Button } from "@/components/ui/button"
16import { Input } from "@/components/ui/input"
17import { Label } from "@/components/ui/label"
18import { Switch } from "@/components/ui/switch"
19import {
20 DitherImage,
21 DitherImageContent,
22 DitherImageFrame,
23 DitherImageOverlay,
24 DitherImageReveal,
25 type DitherRevealDirection,
26 type DitherSize,
27} from "@/registry/default/ui/dither-image"
28
29/** Layered edge + lift (SKILL-DESIGN) — replaces flat card borders. */
30const PANEL_SURFACE = cn(
31 "rounded-2xl bg-card/65 p-4 md:p-5",
32 "shadow-[0px_0px_0px_1px_rgba(0,0,0,0.06),0px_1px_2px_-1px_rgba(0,0,0,0.06),0px_2px_4px_0px_rgba(0,0,0,0.04)]",
33 "dark:shadow-[0px_0px_0px_1px_rgba(255,255,255,0.06),0px_1px_2px_-1px_rgba(255,255,255,0.03),0px_2px_4px_0px_rgba(0,0,0,0.2)]",
34 "transition-shadow duration-200",
35 "hover:shadow-[0px_0px_0px_1px_rgba(0,0,0,0.08),0px_1px_2px_-1px_rgba(0,0,0,0.08),0px_2px_4px_0px_rgba(0,0,0,0.06)]",
36 "dark:hover:shadow-[0px_0px_0px_1px_rgba(255,255,255,0.1),0px_1px_2px_-1px_rgba(255,255,255,0.05),0px_2px_4px_0px_rgba(0,0,0,0.25)]"
37)
38
39const BTN_PRESS =
40 "active:scale-[0.96] transition-transform duration-150 ease-[cubic-bezier(0.2,0,0,1)]"
41
42const SELECT_SURFACE = cn(
43 "h-10 w-full rounded-[calc(var(--radius)-2px)] border border-input/80 bg-input/15 px-2.5 text-sm outline-none",
44 "focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30"
45)
46
47const FALLBACK_SRC = "/images/gibli/gibli-1.jpg"
48const FALLBACK_ALT = "Sample wallpaper — upload or paste a URL to preview"
49
50const REMOTE_HTTP_RE = /^https?:\/\//i
51
52function labelFromRemoteUrl(href: string): string {
53 if (href.startsWith("/")) {
54 const file = href.split("/").pop()
55 return file ?? href
56 }
57 try {
58 const u = new URL(href)
59 const path =
60 u.pathname.length > 48 ? `${u.pathname.slice(0, 48)}…` : u.pathname
61 return `${u.hostname}${path}`
62 } catch {
63 return "Remote image"
64 }
65}
66
67/** Use with `next/image` when the optimizer cannot fetch the host (arbitrary URLs, blobs, data). */
68function needsUnoptimizedImage(src: string): boolean {
69 return (
70 src.startsWith("blob:") ||
71 src.startsWith("data:") ||
72 REMOTE_HTTP_RE.test(src)
73 )
74}
75
76const SIZE_OPTIONS: { value: DitherSize; label: string }[] = [
77 { value: "xs", label: "xs (8px)" },
78// … truncated

What it pulls in

Other registry items

  • dither-image

Files it writes

  • registry/default/example/dither-image-demo-upload.tsx

Facts

Registry
cult/ui
Type
registry:component
Access
Unverified
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-11
Last confirmed
today

Go to the source

www.cult-ui.com nolly-studio/cult-ui on GitHub Raw registry item This item as JSON

More from cult/ui

All 157 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
ai-instructionsai-instructionscult/uiComponentsUnverified2 deps
ai-instructions-demoai-instructions-democult/uiComponentsUnverifiedno deps
animated-numberanimated-numbercult/uiComponentsUnverified1 dep
animated-number-demoanimated-number-democult/uiComponentsUnverifiedno deps
bg-animate-buttonbg-animate-buttoncult/uiComponentsUnverifiedno deps
bg-animate-button-demobg-animate-button-democult/uiComponentsUnverifiedno deps
bg-animated-fractal-dot-gridbg-animated-fractal-dot-gridcult/uiComponentsUnverified1 dep
bg-animated-fractal-dot-grid-demobg-animated-fractal-dot-grid-democult/uiComponentsUnverifiedno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex