Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: icon external link

dev_wandryd4106194705e
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 71750138..f2be182a 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -17,6 +17,7 @@ import { CheckCircleIconStatic } from "@/registry/remocn/icon-check-circle";
import { CheckIconStatic } from "@/registry/remocn/icon-check";
import { CopyIconStatic } from "@/registry/remocn/icon-copy";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
+import { ExternalLinkIconStatic } from "@/registry/remocn/icon-external-link";
import { FlameIconStatic } from "@/registry/remocn/icon-flame";
import { HeartIconStatic } from "@/registry/remocn/icon-heart";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
@@ -215,6 +216,12 @@ export const ICONS: IconEntry[] = [
category: "Arrows & navigation",
Static: ArrowDownIconStatic,
},
+ {
+ name: "icon-external-link",
+ label: "External Link",
+ category: "Arrows & navigation",
+ Static: ExternalLinkIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 01e9d405..0c00add3 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -34,6 +34,7 @@ import { iconCheckCircleConfig } from "@/registry/remocn/icon-check-circle/confi
import { iconCheckConfig } from "@/registry/remocn/icon-check/config";
import { iconCopyConfig } from "@/registry/remocn/icon-copy/config";
import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
+import { iconExternalLinkConfig } from "@/registry/remocn/icon-external-link/config";
import { iconFlameConfig } from "@/registry/remocn/icon-flame/config";
import { iconHeartConfig } from "@/registry/remocn/icon-heart/config";
import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
@@ -647,6 +648,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconDownloadConfig,
},
+ "icon-external-link": {
+ load: () =>
+ import("@/registry/remocn/icon-external-link").then((m) => ({
+ default: m.ExternalLinkIcon,
+ })),
+ config: iconExternalLinkConfig,
+ },
"icon-flame": {
load: () =>
import("@/registry/remocn/icon-flame").then((m) => ({
diff --git a/registry/remocn/icon-external-link/config.ts b/registry/remocn/icon-external-link/config.ts
new file mode 100644
index 00000000..9d298367
--- /dev/null
+++ b/registry/remocn/icon-external-link/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconExternalLinkConfig: ComponentConfig = {
+ componentName: "ExternalLinkIcon",
+ importPath: "@/components/remocn/icon-external-link",
+ controls: {
+ animation: {
+ type: "select",
+ default: "both",
+ options: ["draw", "action", "both"],
+ label: "Animation",
+ },
+ loop: {
+ type: "boolean",
+ default: false,
+ label: "Loop",
+ },
+ size: {
+ type: "number",
+ default: 48,
+ min: 24,
+ max: 200,
+ step: 4,
+ label: "Size",
+ },
+ color: {
+ type: "color",
+ default: "#171717",
+ label: "Color",
+ },
+ strokeWidth: {
+ type: "number",
+ default: 2,
+ min: 1,
+ max: 3,
+ step: 0.25,
+ label: "Stroke width",
+ },
+ },
+ durationInFrames: 70,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-external-link/index.tsx b/registry/remocn/icon-external-link/index.tsx
new file mode 100644
index 00000000..0b3e7677
--- /dev/null
+++ b/registry/remocn/icon-external-link/index.tsx
@@ -0,0 +1,138 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const BOX_PATH = "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6";
+const SHAFT_PATH = "M10 14 21 3";
+const HEAD_PATH = "M15 3h6v6";
+
+const ARROW_CX = 15.5;
+const ARROW_CY = 8.5;
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 20,
+ loop: false,
+} as const;
+
+export function ExternalLinkIcon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionProgress } = useIconAnimation(
+ { animation, loop, speed },
+ TIMINGS,
+ );
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+
+ const boxProgress = interpolate(linearDraw, [0, 0.75], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const shaftProgress = interpolate(linearDraw, [0.5, 0.875], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const headProgress = interpolate(linearDraw, [0.75, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+
+ const box = drawnPathProps(BOX_PATH, boxProgress);
+ const shaft = drawnPathProps(SHAFT_PATH, shaftProgress);
+ const head = drawnPathProps(HEAD_PATH, headProgress);
+
+ const dart = interpolate(actionProgress, [0, 0.4, 0.6, 1], [0, 1, 1, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const tx = 3 * dart;
+ const ty = -3 * dart;
+ const arrowScale = 1 + 0.05 * dart;
+ const scale = 0.85 + 0.15 * scaleIn;
+
+ return (
+ <svg
+ className={className}
+ width={size}
+ height={size}
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke={color}
+ strokeWidth={strokeWidth}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ style={{
+ overflow: "visible",
+ transformOrigin: "center",
+ transform: `scale(${scale})`,
+ }}
+ >
+ <path
+ d={BOX_PATH}
+ strokeDasharray={box.strokeDasharray}
+ strokeDashoffset={box.strokeDashoffset}
+ />
+ <g
+ transform={`translate(${tx} ${ty}) translate(${ARROW_CX} ${ARROW_CY}) scale(${arrowScale}) translate(${-ARROW_CX} ${-ARROW_CY})`}
+ >
+ <path
+ d={SHAFT_PATH}
+ strokeDasharray={shaft.strokeDasharray}
+ strokeDashoffset={shaft.strokeDashoffset}
+ />
+ <path
+ d={HEAD_PATH}
+ strokeDasharray={head.strokeDasharray}
+ strokeDashoffset={head.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function ExternalLinkIconStatic({
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: {
+ size?: number;
+ color?: string;
+ strokeWidth?: number;
+ className?: string;
+}) {
+ return (
+ <svg
+ className={className}
+ width={size}
+ height={size}
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke={color}
+ strokeWidth={strokeWidth}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d={BOX_PATH} />
+ <path d={SHAFT_PATH} />
+ <path d={HEAD_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 1b50a83b..1c4f9d6c 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1699,6 +1699,21 @@
}
]
},
+ {
+ "name": "icon-external-link",
+ "type": "registry:component",
+ "title": "External Link",
+ "description": "Animated Lucide external-link icon — the box and arrow draw on, then the arrow darts out toward the top-right for 'view on GitHub', external docs, or open-in-new-tab beats.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-external-link/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-external-link.tsx"
+ }
+ ]
+ },
{
"name": "icon-sparkles",
"type": "registry:component",