Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon user main
dev_wandryf472cf8cffa7
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 15c640a4..98732089 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -38,6 +38,7 @@ import { LinkIconStatic } from "@/registry/remocn/icon-link";import { LoaderIconStatic } from "@/registry/remocn/icon-loader";import { LockIconStatic } from "@/registry/remocn/icon-lock";import { LogOutIconStatic } from "@/registry/remocn/icon-log-out";+import { MailIconStatic } from "@/registry/remocn/icon-mail";import { MaximizeIconStatic } from "@/registry/remocn/icon-maximize";import { MenuIconStatic } from "@/registry/remocn/icon-menu";import { MicIconStatic } from "@/registry/remocn/icon-mic";@@ -351,6 +352,12 @@ export const ICONS: IconEntry[] = [category: "People & communication",Static: UserPlusIconStatic,},+ {+ name: "icon-mail",+ label: "Mail",+ category: "People & communication",+ Static: MailIconStatic,+ },{name: "icon-heart",label: "Heart",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 1e127ba4..bc59ce93 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -54,6 +54,7 @@ import { iconLinkConfig } from "@/registry/remocn/icon-link/config";import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";import { iconLockConfig } from "@/registry/remocn/icon-lock/config";import { iconLogOutConfig } from "@/registry/remocn/icon-log-out/config";+import { iconMailConfig } from "@/registry/remocn/icon-mail/config";import { iconMaximizeConfig } from "@/registry/remocn/icon-maximize/config";import { iconMenuConfig } from "@/registry/remocn/icon-menu/config";import { iconMicConfig } from "@/registry/remocn/icon-mic/config";@@ -819,6 +820,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconLogOutConfig,},+ "icon-mail": {+ load: () =>+ import("@/registry/remocn/icon-mail").then((m) => ({+ default: m.MailIcon,+ })),+ config: iconMailConfig,+ },"icon-maximize": {load: () =>import("@/registry/remocn/icon-maximize").then((m) => ({diff --git a/registry/remocn/icon-mail/config.ts b/registry/remocn/icon-mail/config.tsnew file mode 100644index 00000000..d8996e40--- /dev/null+++ b/registry/remocn/icon-mail/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconMailConfig: ComponentConfig = {+ componentName: "MailIcon",+ importPath: "@/components/remocn/icon-mail",+ 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: 75,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-mail/index.tsx b/registry/remocn/icon-mail/index.tsxnew file mode 100644index 00000000..ecf4bf99--- /dev/null+++ b/registry/remocn/icon-mail/index.tsx@@ -0,0 +1,134 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const BODY_PATH =+ "M4 4H20A2 2 0 0 1 22 6V18A2 2 0 0 1 20 20H4A2 2 0 0 1 2 18V6A2 2 0 0 1 4 4Z";+const FLAP_PATH = "M22 7 13.009 12.727a2 2 0 0 1-2.009 0L2 7";+const FLAP_RIGHT_PATH = "M22 7 13.009 12.727";+const FLAP_LEFT_PATH = "M2 7 11 12.727";++const TIMINGS = {+ drawDurationInFrames: 16,+ actionDelayInFrames: 2,+ actionDurationInFrames: 24,+ loop: false,+} as const;++export function MailIcon({+ 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 bodyDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const flapDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const flapProgress = acting ? 1 : flapDraw;+ const pop = acting+ ? interpolate(actionProgress, [0, 0.45, 1], [1, 1.05, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;+ const bob = acting+ ? interpolate(actionProgress, [0, 0.45, 1], [0, -1.6, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;++ const body = drawnPathProps(BODY_PATH, bodyDraw);+ const flapRight = drawnPathProps(FLAP_RIGHT_PATH, flapProgress);+ const flapLeft = drawnPathProps(FLAP_LEFT_PATH, flapProgress);++ 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: `translateY(${bob}px) scale(${scale})`,+ }}+ >+ <path+ d={BODY_PATH}+ strokeDasharray={body.strokeDasharray}+ strokeDashoffset={body.strokeDashoffset}+ />+ <path+ d={FLAP_RIGHT_PATH}+ strokeDasharray={flapRight.strokeDasharray}+ strokeDashoffset={flapRight.strokeDashoffset}+ />+ <path+ d={FLAP_LEFT_PATH}+ strokeDasharray={flapLeft.strokeDasharray}+ strokeDashoffset={flapLeft.strokeDashoffset}+ />+ </svg>+ );+}++export function MailIconStatic({+ 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={FLAP_PATH} />+ <rect x="2" y="4" width="20" height="16" rx="2" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex a47dd484..e4af3f74 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2134,6 +2134,21 @@}]},+ {+ "name": "icon-mail",+ "type": "registry:component",+ "title": "Mail",+ "description": "Animated Lucide mail icon — the envelope draws on, then the flap re-traces open and the whole envelope pops: you've got mail.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-mail/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-mail.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",