Skip to content

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

feat: icon eye

dev_wandry4a599c1de34b
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 2e7a4fa8..c7afc1e2 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -24,6 +24,7 @@ import { ChevronUpIconStatic } from "@/registry/remocn/icon-chevron-up";
import { CopyIconStatic } from "@/registry/remocn/icon-copy";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
import { ExternalLinkIconStatic } from "@/registry/remocn/icon-external-link";
+import { EyeIconStatic } from "@/registry/remocn/icon-eye";
import { FilterIconStatic } from "@/registry/remocn/icon-filter";
import { FlameIconStatic } from "@/registry/remocn/icon-flame";
import { HeartIconStatic } from "@/registry/remocn/icon-heart";
@@ -220,6 +221,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: FilterIconStatic,
},
+ {
+ name: "icon-eye",
+ label: "Eye",
+ category: "Actions & UI",
+ Static: EyeIconStatic,
+ },
{
name: "icon-play",
label: "Play",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 920a2263..5d5c2371 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -40,6 +40,7 @@ import { iconChevronUpConfig } from "@/registry/remocn/icon-chevron-up/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 { iconEyeConfig } from "@/registry/remocn/icon-eye/config";
import { iconFilterConfig } from "@/registry/remocn/icon-filter/config";
import { iconFlameConfig } from "@/registry/remocn/icon-flame/config";
import { iconHeartConfig } from "@/registry/remocn/icon-heart/config";
@@ -710,6 +711,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconExternalLinkConfig,
},
+ "icon-eye": {
+ load: () =>
+ import("@/registry/remocn/icon-eye").then((m) => ({
+ default: m.EyeIcon,
+ })),
+ config: iconEyeConfig,
+ },
"icon-filter": {
load: () =>
import("@/registry/remocn/icon-filter").then((m) => ({
diff --git a/registry/remocn/icon-eye/config.ts b/registry/remocn/icon-eye/config.ts
new file mode 100644
index 00000000..d98ce1d8
--- /dev/null
+++ b/registry/remocn/icon-eye/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconEyeConfig: ComponentConfig = {
+ componentName: "EyeIcon",
+ importPath: "@/components/remocn/icon-eye",
+ 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-eye/index.tsx b/registry/remocn/icon-eye/index.tsx
new file mode 100644
index 00000000..d13ca85f
--- /dev/null
+++ b/registry/remocn/icon-eye/index.tsx
@@ -0,0 +1,130 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const OUTLINE_PATH =
+ "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0";
+const PUPIL_PATH =
+ "M12 9 A3 3 0 0 1 15 12 A3 3 0 0 1 12 15 A3 3 0 0 1 9 12 A3 3 0 0 1 12 9";
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 22,
+ loop: false,
+} as const;
+
+export function EyeIcon({
+ 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 outlineDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const pupilDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const blink = acting
+ ? interpolate(actionProgress, [0, 0.27, 0.55], [1, 0.4, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+ const pupilPop =
+ acting && actionProgress >= 0.55
+ ? interpolate(actionProgress, [0.55, 0.77, 1], [0.8, 1.1, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+
+ const outline = drawnPathProps(OUTLINE_PATH, outlineDraw);
+ const pupil = drawnPathProps(PUPIL_PATH, pupilDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const pupilTransform = `translate(${12 * (1 - pupilPop)} ${12 * (1 - pupilPop)}) scale(${pupilPop})`;
+
+ 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}) scaleY(${blink})`,
+ }}
+ >
+ <path
+ d={OUTLINE_PATH}
+ strokeDasharray={outline.strokeDasharray}
+ strokeDashoffset={outline.strokeDashoffset}
+ />
+ <g transform={pupilTransform}>
+ <path
+ d={PUPIL_PATH}
+ strokeDasharray={pupil.strokeDasharray}
+ strokeDashoffset={pupil.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function EyeIconStatic({
+ 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={OUTLINE_PATH} />
+ <circle cx="12" cy="12" r="3" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index f69a214b..792822f9 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2014,6 +2014,21 @@
}
]
},
+ {
+ "name": "icon-eye",
+ "type": "registry:component",
+ "title": "Eye",
+ "description": "Animated Lucide eye icon — draws on, then blinks once and refocuses its pupil.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-eye/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-eye.tsx"
+ }
+ ]
+ },
{
"name": "icon-sparkles",
"type": "registry:component",