Skip to content

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

feat: icon zap

dev_wandryd792101b6326
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index a32c7b7b..143d65ab 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -23,6 +23,7 @@ import { SendIconStatic } from "@/registry/remocn/icon-send";
import { SettingsIconStatic } from "@/registry/remocn/icon-settings";
import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";
import { StarIconStatic } from "@/registry/remocn/icon-star";
+import { ZapIconStatic } from "@/registry/remocn/icon-zap";
import { TrashIconStatic } from "@/registry/remocn/icon-trash";
import { UploadIconStatic } from "@/registry/remocn/icon-upload";
import { XIconStatic } from "@/registry/remocn/icon-x";
@@ -159,6 +160,12 @@ export const ICONS: IconEntry[] = [
category: "Emotion & accents",
Static: SparklesIconStatic,
},
+ {
+ name: "icon-zap",
+ label: "Zap",
+ category: "Emotion & accents",
+ Static: ZapIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 95bc505b..ed3d7bd8 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -43,6 +43,7 @@ import { iconStarConfig } from "@/registry/remocn/icon-star/config";
import { iconTrashConfig } from "@/registry/remocn/icon-trash/config";
import { iconUploadConfig } from "@/registry/remocn/icon-upload/config";
import { iconXConfig } from "@/registry/remocn/icon-x/config";
+import { iconZapConfig } from "@/registry/remocn/icon-zap/config";
import { infiniteBentoPanConfig } from "@/registry/remocn/infinite-bento-pan/config";
import { infiniteMarqueeConfig } from "@/registry/remocn/infinite-marquee/config";
import { inlineHighlightConfig } from "@/registry/remocn/inline-highlight/config";
@@ -709,6 +710,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconXConfig,
},
+ "icon-zap": {
+ load: () =>
+ import("@/registry/remocn/icon-zap").then((m) => ({
+ default: m.ZapIcon,
+ })),
+ config: iconZapConfig,
+ },
"wave-wipe": {
load: () =>
import("@/components/docs/examples/wave-wipe-example").then((m) => ({
diff --git a/registry/remocn/icon-zap/config.ts b/registry/remocn/icon-zap/config.ts
new file mode 100644
index 00000000..0c493246
--- /dev/null
+++ b/registry/remocn/icon-zap/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconZapConfig: ComponentConfig = {
+ componentName: "ZapIcon",
+ importPath: "@/components/remocn/icon-zap",
+ 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-zap/index.tsx b/registry/remocn/icon-zap/index.tsx
new file mode 100644
index 00000000..49009eb6
--- /dev/null
+++ b/registry/remocn/icon-zap/index.tsx
@@ -0,0 +1,122 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const ZAP_PATH =
+ "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z";
+
+const TIMINGS = {
+ drawDurationInFrames: 10,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 14,
+ loop: false,
+} as const;
+
+export function ZapIcon({
+ 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 boltProgress = interpolate(linearDraw, [0, 0.8], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const bolt = drawnPathProps(ZAP_PATH, boltProgress);
+
+ const flash = interpolate(
+ actionProgress,
+ [0, 0.15, 0.3, 0.45, 0.6, 1],
+ [1, 0.3, 1, 0.3, 1, 1],
+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },
+ );
+ const pop = interpolate(actionProgress, [0, 0.3, 0.6, 1], [1, 1.1, 1, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const strikeEase = {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ } as const;
+ const strikeX = interpolate(actionProgress, [0, 0.15, 0.4, 1], [0, 1.5, -3, 0], strikeEase);
+ const strikeY = interpolate(actionProgress, [0, 0.15, 0.4, 1], [0, -2, 4, 0], strikeEase);
+ const skew = interpolate(actionProgress, [0, 0.15, 0.4, 0.7, 1], [0, -4, 9, -2, 0], strikeEase);
+ const scale = (0.85 + 0.15 * scaleIn) * 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: `scale(${scale})`,
+ }}
+ >
+ <g
+ opacity={flash}
+ transform={`translate(${strikeX} ${strikeY}) translate(12 12) skewX(${skew}) translate(-12 -12)`}
+ >
+ <path
+ d={ZAP_PATH}
+ strokeDasharray={bolt.strokeDasharray}
+ strokeDashoffset={bolt.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function ZapIconStatic({
+ 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={ZAP_PATH} />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index e004ee3f..1084cdd8 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1623,6 +1623,21 @@
"target": "components/remocn/icon-sparkles.tsx"
}
]
+ },
+ {
+ "name": "icon-zap",
+ "type": "registry:component",
+ "title": "Zap",
+ "description": "Animated Lucide zap icon — the bolt draws in fast, then flashes with a double blink for speed, performance, or instant-result claims.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-zap/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-zap.tsx"
+ }
+ ]
}
]
}