BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/pixel-perfect/center-split-reveal

center-split-reveal

pixel-perfect/center-split-reveal
FreeBlock

A center-split mask reveal — the image is clipped to a closed vertical seam down the middle, then the clip-path opens left and right to split it apart and uncover the whole frame.

Install it

npx shadcn@latest add https://www.pixel-perfect.space/r/center-split-reveal.json

Source

registry/new-york/mask/center-split-reveal.tsxwww.pixel-perfect.space/r/center-split-reveal.json
1"use client";
2
3/**
4 * A center-split mask reveal — the image is clipped to a closed seam at the middle, then the clip-path opens outward (left/right for "horizontal", top/bottom for "vertical") to split it apart and uncover the whole frame.
5 */
6
7import { useEffect, useRef } from "react";
8import gsap from "gsap";
9
10const SRC = "/bend-image-reveal.gif";
11
12export type SplitAxis = "horizontal" | "vertical";
13
14const HIDDEN: Record<SplitAxis, string> = {
15 horizontal: "inset(0% 50% 0% 50% round 12px)",
16 vertical: "inset(50% 0% 50% 0% round 12px)",
17};
18const SHOWN = "inset(0% 0% 0% 0% round 12px)";
19
20const CenterSplitReveal = ({
21 axis = "horizontal",
22}: {
23 axis?: SplitAxis;
24}) => {
25 const imgRef = useRef<HTMLImageElement>(null);
26
27 const reveal = () => {
28 if (!imgRef.current) return;
29 gsap.fromTo(
30 imgRef.current,
31 {
32 clipPath: HIDDEN[axis],
33 scale: 1.4,
34 filter: "blur(16px)",
35 },
36 {
37 clipPath: SHOWN,
38 scale: 1,
39 filter: "blur(0px)",
40 duration: 1.2,
41 ease: "power4.inOut",
42 },
43 );
44 };
45
46 useEffect(() => {
47 reveal();
48 // eslint-disable-next-line react-hooks/exhaustive-deps
49 }, [axis]);
50
51 return (
52 <button
53 onClick={reveal}
54 className="relative aspect-video w-[40rem] max-w-[92%] cursor-pointer overflow-hidden rounded-xl"
55 aria-label="Replay reveal"
56 >
57 <img
58 ref={imgRef}
59 src={SRC}
60 alt="reveal"
61 className="size-full object-cover"
62 style={{
63 clipPath: HIDDEN[axis],
64 transform: "scale(1.4)",
65 filter: "blur(16px)",
66 }}
67 />
68 </button>
69 );
70};
71
72export default CenterSplitReveal;

What it pulls in

npm packages

  • gsap

Files it writes

  • registry/new-york/mask/center-split-reveal.tsx

Facts

Registry
pixel-perfect
Type
registry:block
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

www.pixel-perfect.space vansh-nagar/Pixel-Perfect on GitHub Raw registry item This item as JSON

More from pixel-perfect

All 332 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
3d-button3d-buttonpixel-perfectBlocksFree2 deps
abhinav-bento-buttonabhinav-bento-buttonpixel-perfectBlocksFreeno deps
accordion-carouselaccordion-carouselpixel-perfectBlocksFree1 dep
accordion-foldaccordion-foldpixel-perfectBlocksFree1 dep
activity-wheel-motionactivity-wheel-motionpixel-perfectBlocksFree2 deps
animated-textureanimated-texturepixel-perfectBlocksFree1 dep
aperture-mask-revealaperture-mask-revealpixel-perfectBlocksFree1 dep
aurora-curtainaurora-curtainpixel-perfectBlocksFreeno 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