BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/framecn/code-diff-wipe

Code Diff Wipe

framecn/code-diff-wipe
FreeComponent

Before/after code reveal via clip-path wipe with a handle marker.

Install it

npx shadcn@latest add https://framecn.dev/r/code-diff-wipe.json

Source

registry/bases/editframe/components/code-diff-wipe/index.tsxframecn.dev/r/code-diff-wipe.json · first 6 KB
1"use client";
2
3import { Timegroup } from "@editframe/react";
4import type { CSSProperties } from "react";
5
6const DEFAULT_BEFORE = `function getUser(id) {
7 return fetch('/api/user/' + id)
8 .then(function (res) {
9 return res.json();
10 })
11 .then(function (data) {
12 if (data.error) {
13 throw new Error(data.error);
14 }
15 return data.user;
16 });
17}`;
18
19const DEFAULT_AFTER = `async function getUser(id: string) {
20 const res = await fetch(\`/api/user/\${id}\`);
21 const { user, error } = await res.json();
22 if (error) throw new Error(error);
23 return user;
24}`;
25
26export interface CodeDiffWipeProps {
27 before?: string;
28 after?: string;
29 language?: string;
30 background?: string;
31 accent?: string;
32 transitionStart?: number;
33 transitionDuration?: number;
34 showHandle?: boolean;
35 speed?: number;
36 fps?: number;
37 durationInFrames?: number;
38 width?: number;
39 height?: number;
40 className?: string;
41}
42
43const CodePane = ({
44 code,
45 background,
46 label,
47 labelColor,
48 language,
49 dimmed,
50}: {
51 code: string;
52 background: string;
53 label: string;
54 labelColor: string;
55 language: string;
56 dimmed?: boolean;
57}) => {
58 const lines = code.split("\n");
59 return (
60 <div
61 style={{
62 background,
63 display: "flex",
64 flexDirection: "column",
65 inset: 0,
66 position: "absolute",
67 }}
68 >
69 {/* Header */}
70 <div
71 style={{
72 alignItems: "center",
73 background: "rgba(255,255,255,0.02)",
74 borderBottom: "1px solid rgba(255,255,255,0.06)",
75 display: "flex",
76 height: 44,
77 justifyContent: "space-between",
78 padding: "0 18px",
79 }}
80 >
81 <div
82 style={{
83 color: "#71717a",
84 fontFamily:
85 "var(--font-geist-mono), ui-monospace, SFMono-Regular, monospace",
86 fontSize: 13,
87 }}
88 >
89 {language}
90 </div>
91 <div
92 style={{
93 background: `${labelColor}1a`,
94 border: `1px solid ${labelColor}55`,
95 borderRadius: 999,
96 color: labelColor,
97 fontSize: 11,
98 fontWeight: 700,
99 letterSpacing: "0.12em",
100 padding: "4px 10px",
101 }}
102 >
103 {label}
104 </div>
105 </div>
106
107 {/* Code */}
108 <pre
109 style={{
110 color: dimmed ? "#71717a" : "#e4e4e7",
111 flex: 1,
112 fontFamily:
113// … truncated

What it pulls in

npm packages

  • remotion

Files it writes

  • registry/bases/editframe/components/code-diff-wipe/index.tsx

Facts

Registry
framecn
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

framecn.dev shadcn-labs/framecn on GitHub Raw registry item This item as JSON

More from framecn

All 101 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AI Generate Overlayai-generate-overlayframecnComponentsFree1 dep
AI Generation Canvasai-generation-canvasframecnComponentsFree1 dep
Animated Bar Chartanimated-bar-chartframecnComponentsFree1 dep
Animated Line Chartanimated-line-chartframecnComponentsFree1 dep
BackdropbackdropframecnComponentsFree1 dep
Blur Out Upblur-out-upframecnComponentsFree1 dep
Blur Revealblur-revealframecnComponentsFree1 dep
Bounding Box Selectorbounding-box-selectorframecnComponentsFree1 dep
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