Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon file
dev_wandryb856bb316eed
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex caea443c..3103f0fe 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -30,6 +30,7 @@ import { DownloadIconStatic } from "@/registry/remocn/icon-download";import { ExternalLinkIconStatic } from "@/registry/remocn/icon-external-link";import { EyeOffIconStatic } from "@/registry/remocn/icon-eye-off";import { EyeIconStatic } from "@/registry/remocn/icon-eye";+import { FileTextIconStatic } from "@/registry/remocn/icon-file-text";import { FilterIconStatic } from "@/registry/remocn/icon-filter";import { FlameIconStatic } from "@/registry/remocn/icon-flame";import { FolderIconStatic } from "@/registry/remocn/icon-folder";@@ -203,6 +204,12 @@ export const ICONS: IconEntry[] = [category: "Files & dev",Static: FolderIconStatic,},+ {+ name: "icon-file-text",+ label: "File Text",+ category: "Files & dev",+ Static: FileTextIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 4dc180fc..b565d5cd 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -46,6 +46,7 @@ import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";import { iconExternalLinkConfig } from "@/registry/remocn/icon-external-link/config";import { iconEyeOffConfig } from "@/registry/remocn/icon-eye-off/config";import { iconEyeConfig } from "@/registry/remocn/icon-eye/config";+import { iconFileTextConfig } from "@/registry/remocn/icon-file-text/config";import { iconFilterConfig } from "@/registry/remocn/icon-filter/config";import { iconFlameConfig } from "@/registry/remocn/icon-flame/config";import { iconFolderConfig } from "@/registry/remocn/icon-folder/config";@@ -777,6 +778,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconEyeConfig,},+ "icon-file-text": {+ load: () =>+ import("@/registry/remocn/icon-file-text").then((m) => ({+ default: m.FileTextIcon,+ })),+ config: iconFileTextConfig,+ },"icon-filter": {load: () =>import("@/registry/remocn/icon-filter").then((m) => ({diff --git a/registry/remocn/icon-file-text/config.ts b/registry/remocn/icon-file-text/config.tsnew file mode 100644index 00000000..f8ff23f0--- /dev/null+++ b/registry/remocn/icon-file-text/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconFileTextConfig: ComponentConfig = {+ componentName: "FileTextIcon",+ importPath: "@/components/remocn/icon-file-text",+ 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: 80,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-file-text/index.tsx b/registry/remocn/icon-file-text/index.tsxnew file mode 100644index 00000000..7d056461--- /dev/null+++ b/registry/remocn/icon-file-text/index.tsx@@ -0,0 +1,154 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const PAGE_PATH =+ "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z";+const FOLD_PATH = "M14 2v5a1 1 0 0 0 1 1h5";+const LINE1_PATH = "M8 9H10";+const LINE2_PATH = "M8 13H16";+const LINE3_PATH = "M8 17H16";++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 26,+ loop: false,+} as const;++export function FileTextIcon({+ 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 pageDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const foldDraw = interpolate(linearDraw, [0.55, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const line1Type = interpolate(actionProgress, [0.05, 0.4], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.linear,+ });+ const line2Type = interpolate(actionProgress, [0.3, 0.65], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.linear,+ });+ const line3Type = interpolate(actionProgress, [0.55, 0.9], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.linear,+ });++ const line1Progress = animation === "draw" ? 1 : acting ? line1Type : 0;+ const line2Progress = animation === "draw" ? 1 : acting ? line2Type : 0;+ const line3Progress = animation === "draw" ? 1 : acting ? line3Type : 0;++ const page = drawnPathProps(PAGE_PATH, acting ? 1 : pageDraw);+ const fold = drawnPathProps(FOLD_PATH, acting ? 1 : foldDraw);+ const line1 = drawnPathProps(LINE1_PATH, line1Progress);+ const line2 = drawnPathProps(LINE2_PATH, line2Progress);+ const line3 = drawnPathProps(LINE3_PATH, line3Progress);++ const scale = 0.85 + 0.15 * scaleIn;++ 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={PAGE_PATH}+ strokeDasharray={page.strokeDasharray}+ strokeDashoffset={page.strokeDashoffset}+ />+ <path+ d={FOLD_PATH}+ strokeDasharray={fold.strokeDasharray}+ strokeDashoffset={fold.strokeDashoffset}+ />+ <path+ d={LINE1_PATH}+ strokeDasharray={line1.strokeDasharray}+ strokeDashoffset={line1.strokeDashoffset}+ />+ <path+ d={LINE2_PATH}+ strokeDasharray={line2.strokeDasharray}+ strokeDashoffset={line2.strokeDashoffset}+ />+ <path+ d={LINE3_PATH}+ strokeDasharray={line3.strokeDasharray}+ strokeDashoffset={line3.strokeDashoffset}+ />+ </svg>+ );+}++export function FileTextIconStatic({+ 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={PAGE_PATH} />+ <path d={FOLD_PATH} />+ <path d="M10 9H8" />+ <path d="M16 13H8" />+ <path d="M16 17H8" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 6a7dc251..7df68f25 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2344,6 +2344,21 @@}]},+ {+ "name": "icon-file-text",+ "type": "registry:component",+ "title": "File Text",+ "description": "Animated Lucide file-text icon — the page draws on, then the text lines type themselves in, top to bottom.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-file-text/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-file-text.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",