Skip to content

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

feat: icon share

dev_wandry788a8b22637a
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index a8844c98..fece9516 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -42,6 +42,7 @@ import { PlusIconStatic } from "@/registry/remocn/icon-plus";
import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";
import { SearchIconStatic } from "@/registry/remocn/icon-search";
import { SendIconStatic } from "@/registry/remocn/icon-send";
+import { Share2IconStatic } from "@/registry/remocn/icon-share-2";
import { SettingsIconStatic } from "@/registry/remocn/icon-settings";
import { SkipForwardIconStatic } from "@/registry/remocn/icon-skip-forward";
import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";
@@ -206,6 +207,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: PencilIconStatic,
},
+ {
+ name: "icon-share-2",
+ label: "Share 2",
+ category: "Actions & UI",
+ Static: Share2IconStatic,
+ },
{
name: "icon-play",
label: "Play",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 8cde3388..3479234d 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -59,6 +59,7 @@ import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";
import { iconSearchConfig } from "@/registry/remocn/icon-search/config";
import { iconSendConfig } from "@/registry/remocn/icon-send/config";
import { iconSettingsConfig } from "@/registry/remocn/icon-settings/config";
+import { iconShare2Config } from "@/registry/remocn/icon-share-2/config";
import { iconSkipForwardConfig } from "@/registry/remocn/icon-skip-forward/config";
import { iconSparklesConfig } from "@/registry/remocn/icon-sparkles/config";
import { iconStarConfig } from "@/registry/remocn/icon-star/config";
@@ -841,6 +842,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconSettingsConfig,
},
+ "icon-share-2": {
+ load: () =>
+ import("@/registry/remocn/icon-share-2").then((m) => ({
+ default: m.Share2Icon,
+ })),
+ config: iconShare2Config,
+ },
"icon-skip-forward": {
load: () =>
import("@/registry/remocn/icon-skip-forward").then((m) => ({
diff --git a/registry/remocn/icon-share-2/config.ts b/registry/remocn/icon-share-2/config.ts
new file mode 100644
index 00000000..97dd9520
--- /dev/null
+++ b/registry/remocn/icon-share-2/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconShare2Config: ComponentConfig = {
+ componentName: "Share2Icon",
+ importPath: "@/components/remocn/icon-share-2",
+ 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: 80,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-share-2/index.tsx b/registry/remocn/icon-share-2/index.tsx
new file mode 100644
index 00000000..73576595
--- /dev/null
+++ b/registry/remocn/icon-share-2/index.tsx
@@ -0,0 +1,177 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const LEFT_NODE_PATH =
+ "M6 9 A3 3 0 0 1 9 12 A3 3 0 0 1 6 15 A3 3 0 0 1 3 12 A3 3 0 0 1 6 9";
+const TOP_NODE_PATH =
+ "M18 2 A3 3 0 0 1 21 5 A3 3 0 0 1 18 8 A3 3 0 0 1 15 5 A3 3 0 0 1 18 2";
+const BOTTOM_NODE_PATH =
+ "M18 16 A3 3 0 0 1 21 19 A3 3 0 0 1 18 22 A3 3 0 0 1 15 19 A3 3 0 0 1 18 16";
+const TOP_LINE_PATH = "M8.59 10.49 15.41 6.51";
+const BOTTOM_LINE_PATH = "M8.59 13.51 15.42 17.49";
+
+const TIMINGS = {
+ drawDurationInFrames: 18,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 26,
+ loop: false,
+} as const;
+
+export function Share2Icon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionProgress, actionFrame } =
+ useIconAnimation({ animation, loop, speed }, TIMINGS);
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+ const acting = animation !== "draw" && actionFrame >= 0;
+
+ const leftNodeDraw = interpolate(linearDraw, [0, 0.44], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const connectorDraw = interpolate(linearDraw, [0.33, 0.78], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const rightNodeDraw = interpolate(linearDraw, [0.56, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const topLineProgress = acting
+ ? interpolate(actionProgress, [0, 0.4], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ })
+ : connectorDraw;
+ const bottomLineProgress = acting
+ ? interpolate(actionProgress, [0.15, 0.55], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ })
+ : connectorDraw;
+
+ const topPop = acting
+ ? interpolate(actionProgress, [0.3, 0.45, 0.65], [1, 1.25, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+ const bottomPop = acting
+ ? interpolate(actionProgress, [0.45, 0.6, 0.8], [1, 1.25, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+
+ const leftNode = drawnPathProps(LEFT_NODE_PATH, leftNodeDraw);
+ const topLine = drawnPathProps(TOP_LINE_PATH, topLineProgress);
+ const bottomLine = drawnPathProps(BOTTOM_LINE_PATH, bottomLineProgress);
+ const topNode = drawnPathProps(TOP_NODE_PATH, rightNodeDraw);
+ const bottomNode = drawnPathProps(BOTTOM_NODE_PATH, rightNodeDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const topTransform = `translate(${18 * (1 - topPop)} ${5 * (1 - topPop)}) scale(${topPop})`;
+ const bottomTransform = `translate(${18 * (1 - bottomPop)} ${19 * (1 - bottomPop)}) scale(${bottomPop})`;
+
+ 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={LEFT_NODE_PATH}
+ strokeDasharray={leftNode.strokeDasharray}
+ strokeDashoffset={leftNode.strokeDashoffset}
+ />
+ <path
+ d={TOP_LINE_PATH}
+ strokeDasharray={topLine.strokeDasharray}
+ strokeDashoffset={topLine.strokeDashoffset}
+ />
+ <path
+ d={BOTTOM_LINE_PATH}
+ strokeDasharray={bottomLine.strokeDasharray}
+ strokeDashoffset={bottomLine.strokeDashoffset}
+ />
+ <g transform={topTransform}>
+ <path
+ d={TOP_NODE_PATH}
+ strokeDasharray={topNode.strokeDasharray}
+ strokeDashoffset={topNode.strokeDashoffset}
+ />
+ </g>
+ <g transform={bottomTransform}>
+ <path
+ d={BOTTOM_NODE_PATH}
+ strokeDasharray={bottomNode.strokeDasharray}
+ strokeDashoffset={bottomNode.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function Share2IconStatic({
+ 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"
+ >
+ <circle cx="18" cy="5" r="3" />
+ <circle cx="6" cy="12" r="3" />
+ <circle cx="18" cy="19" r="3" />
+ <line x1="8.59" x2="15.42" y1="13.51" y2="17.49" />
+ <line x1="15.41" x2="8.59" y1="6.51" y2="10.49" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 3ffd9beb..6cb711b7 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1984,6 +1984,21 @@
}
]
},
+ {
+ "name": "icon-share-2",
+ "type": "registry:component",
+ "title": "Share 2",
+ "description": "Animated Lucide share-2 icon — three nodes draw on, then the connections re-trace and the receiving nodes pop as the share lands.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-share-2/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-share-2.tsx"
+ }
+ ]
+ },
{
"name": "icon-sparkles",
"type": "registry:component",