Skip to content

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

feat: icon plus

dev_wandry11fa6d097db2
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 5008d553..5a218242 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -15,6 +15,7 @@ import { CopyIconStatic } from "@/registry/remocn/icon-copy";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
import { InfoIconStatic } from "@/registry/remocn/icon-info";
import { LoaderIconStatic } from "@/registry/remocn/icon-loader";
+import { PlusIconStatic } from "@/registry/remocn/icon-plus";
import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";
import { SearchIconStatic } from "@/registry/remocn/icon-search";
import { SettingsIconStatic } from "@/registry/remocn/icon-settings";
@@ -124,6 +125,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: TrashIconStatic,
},
+ {
+ name: "icon-plus",
+ label: "Plus",
+ category: "Actions & UI",
+ Static: PlusIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 90898d98..2007451b 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -32,6 +32,7 @@ import { iconCopyConfig } from "@/registry/remocn/icon-copy/config";
import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";
+import { iconPlusConfig } from "@/registry/remocn/icon-plus/config";
import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";
import { iconSearchConfig } from "@/registry/remocn/icon-search/config";
import { iconSettingsConfig } from "@/registry/remocn/icon-settings/config";
@@ -620,6 +621,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconLoaderConfig,
},
+ "icon-plus": {
+ load: () =>
+ import("@/registry/remocn/icon-plus").then((m) => ({
+ default: m.PlusIcon,
+ })),
+ config: iconPlusConfig,
+ },
"icon-refresh-cw": {
load: () =>
import("@/registry/remocn/icon-refresh-cw").then((m) => ({
diff --git a/registry/remocn/icon-plus/config.ts b/registry/remocn/icon-plus/config.ts
new file mode 100644
index 00000000..57cdcc7c
--- /dev/null
+++ b/registry/remocn/icon-plus/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconPlusConfig: ComponentConfig = {
+ componentName: "PlusIcon",
+ importPath: "@/components/remocn/icon-plus",
+ 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: 60,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-plus/index.tsx b/registry/remocn/icon-plus/index.tsx
new file mode 100644
index 00000000..55866f82
--- /dev/null
+++ b/registry/remocn/icon-plus/index.tsx
@@ -0,0 +1,122 @@
+"use client";
+
+import { Easing, interpolate, spring, useVideoConfig } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const HORIZONTAL_PATH = "M5 12h14";
+const VERTICAL_PATH = "M12 5v14";
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 16,
+ loop: false,
+} as const;
+
+export function PlusIcon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionFrame, actionProgress } =
+ useIconAnimation({ animation, loop, speed }, TIMINGS);
+ const { fps } = useVideoConfig();
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+
+ const horizontalProgress = interpolate(linearDraw, [0, 0.571], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const verticalProgress = interpolate(linearDraw, [0.286, 0.857], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+
+ const horizontal = drawnPathProps(HORIZONTAL_PATH, horizontalProgress);
+ const vertical = drawnPathProps(VERTICAL_PATH, verticalProgress);
+
+ const rotate =
+ 90 *
+ spring({
+ frame: actionFrame,
+ fps,
+ config: { damping: 14, stiffness: 130, mass: 0.8 },
+ durationInFrames: 16,
+ });
+ const pop = interpolate(actionProgress, [0, 0.5, 1], [0, 1, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const scale = (0.85 + 0.15 * scaleIn) * (1 + 0.15 * pop);
+
+ 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: `rotate(${rotate}deg) scale(${scale})`,
+ }}
+ >
+ <path
+ d={HORIZONTAL_PATH}
+ strokeDasharray={horizontal.strokeDasharray}
+ strokeDashoffset={horizontal.strokeDashoffset}
+ />
+ <path
+ d={VERTICAL_PATH}
+ strokeDasharray={vertical.strokeDasharray}
+ strokeDashoffset={vertical.strokeDashoffset}
+ />
+ </svg>
+ );
+}
+
+export function PlusIconStatic({
+ 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={HORIZONTAL_PATH} />
+ <path d={VERTICAL_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index f5924ce4..6dd5993e 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1548,6 +1548,21 @@
"target": "components/remocn/icon-trash.tsx"
}
]
+ },
+ {
+ "name": "icon-plus",
+ "type": "registry:component",
+ "title": "Plus",
+ "description": "Animated Lucide plus icon — the two strokes draw on, then the mark twirls 90deg with a scale pop for an energetic add or create beat.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-plus/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-plus.tsx"
+ }
+ ]
}
]
}