Skip to content

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

feat: icon activity

dev_wandry2ec80bec39ce
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index ff7c5e08..3adf9289 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -8,6 +8,7 @@ import { AbsoluteFill } from "remotion";
import { usePrefersReducedMotion } from "@/lib/use-prefers-reduced-motion";
import { cn } from "@/lib/utils";
import registry, { type RegistryEntry } from "@/registry/__index__";
+import { ActivityIconStatic } from "@/registry/remocn/icon-activity";
import { AlertTriangleIconStatic } from "@/registry/remocn/icon-alert-triangle";
import { ArrowDownIconStatic } from "@/registry/remocn/icon-arrow-down";
import { ArrowLeftIconStatic } from "@/registry/remocn/icon-arrow-left";
@@ -145,6 +146,12 @@ export const ICONS: IconEntry[] = [
category: "Status & feedback",
Static: XIconStatic,
},
+ {
+ name: "icon-activity",
+ label: "Activity",
+ category: "Charts & data",
+ Static: ActivityIconStatic,
+ },
{
name: "icon-alert-triangle",
label: "Alert Triangle",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 0dfd66e7..ca08b482 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -24,6 +24,7 @@ import { githubStarsConfig } from "@/registry/remocn/github-stars/config";
import { glassCodeBlockConfig } from "@/registry/remocn/glass-code-block/config";
import { glassCodeWalkConfig } from "@/registry/remocn/glass-code-walk/config";
import { grainDissolveConfig } from "@/registry/remocn/grain-dissolve/config";
+import { iconActivityConfig } from "@/registry/remocn/icon-activity/config";
import { iconAlertTriangleConfig } from "@/registry/remocn/icon-alert-triangle/config";
import { iconArrowDownConfig } from "@/registry/remocn/icon-arrow-down/config";
import { iconArrowLeftConfig } from "@/registry/remocn/icon-arrow-left/config";
@@ -650,6 +651,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: grainDissolveConfig,
},
+ "icon-activity": {
+ load: () =>
+ import("@/registry/remocn/icon-activity").then((m) => ({
+ default: m.ActivityIcon,
+ })),
+ config: iconActivityConfig,
+ },
"icon-alert-triangle": {
load: () =>
import("@/registry/remocn/icon-alert-triangle").then((m) => ({
diff --git a/registry/remocn/icon-activity/config.ts b/registry/remocn/icon-activity/config.ts
new file mode 100644
index 00000000..d037266f
--- /dev/null
+++ b/registry/remocn/icon-activity/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconActivityConfig: ComponentConfig = {
+ componentName: "ActivityIcon",
+ importPath: "@/components/remocn/icon-activity",
+ controls: {
+ animation: {
+ type: "select",
+ default: "both",
+ options: ["draw", "action", "both"],
+ label: "Animation",
+ },
+ loop: {
+ type: "boolean",
+ default: true,
+ 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: 90,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-activity/index.tsx b/registry/remocn/icon-activity/index.tsx
new file mode 100644
index 00000000..276e458c
--- /dev/null
+++ b/registry/remocn/icon-activity/index.tsx
@@ -0,0 +1,103 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const PULSE_PATH =
+ "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2";
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 45,
+ loop: true,
+} as const;
+
+export function ActivityIcon({
+ animation = "both",
+ loop = true,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionProgress, actionFrame } =
+ useIconAnimation({ animation, loop, speed }, TIMINGS);
+
+ const acting = animation !== "draw" && actionFrame >= 0;
+
+ const beat = acting
+ ? interpolate(
+ actionProgress,
+ [0, 0.1, 0.18, 0.28, 0.38, 1],
+ [1, 1.07, 1, 1.05, 1, 1],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ },
+ )
+ : 1;
+
+ const pulse = drawnPathProps(PULSE_PATH, acting ? 1 : drawProgress);
+
+ const scale = (0.85 + 0.15 * scaleIn) * beat;
+
+ 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={PULSE_PATH}
+ strokeDasharray={pulse.strokeDasharray}
+ strokeDashoffset={pulse.strokeDashoffset}
+ />
+ </svg>
+ );
+}
+
+export function ActivityIconStatic({
+ 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="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index cffda594..3e9b71a5 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1384,6 +1384,21 @@
}
]
},
+ {
+ "name": "icon-activity",
+ "type": "registry:component",
+ "title": "Activity",
+ "description": "Animated Lucide activity icon — the pulse line sweeps through like an EKG, popping at the peak. Loops by default.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-activity/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-activity.tsx"
+ }
+ ]
+ },
{
"name": "icon-alert-triangle",
"type": "registry:component",