Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon trash
dev_wandry2ca716489a2a
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 1d99c68e..5008d553 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -18,6 +18,7 @@ import { LoaderIconStatic } from "@/registry/remocn/icon-loader";import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";import { SearchIconStatic } from "@/registry/remocn/icon-search";import { SettingsIconStatic } from "@/registry/remocn/icon-settings";+import { TrashIconStatic } from "@/registry/remocn/icon-trash";import { UploadIconStatic } from "@/registry/remocn/icon-upload";import { XIconStatic } from "@/registry/remocn/icon-x";@@ -117,6 +118,12 @@ export const ICONS: IconEntry[] = [category: "Actions & UI",Static: SettingsIconStatic,},+ {+ name: "icon-trash",+ label: "Trash",+ category: "Actions & UI",+ Static: TrashIconStatic,+ },];const CATEGORY_ORDER: IconCategory[] = [diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex a24d4a58..90898d98 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -35,6 +35,7 @@ import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";import { iconSearchConfig } from "@/registry/remocn/icon-search/config";import { iconSettingsConfig } from "@/registry/remocn/icon-settings/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 { infiniteBentoPanConfig } from "@/registry/remocn/infinite-bento-pan/config";@@ -640,6 +641,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconSettingsConfig,},+ "icon-trash": {+ load: () =>+ import("@/registry/remocn/icon-trash").then((m) => ({+ default: m.TrashIcon,+ })),+ config: iconTrashConfig,+ },"icon-upload": {load: () =>import("@/registry/remocn/icon-upload").then((m) => ({diff --git a/registry/remocn/icon-trash/config.ts b/registry/remocn/icon-trash/config.tsnew file mode 100644index 00000000..4590a7e6--- /dev/null+++ b/registry/remocn/icon-trash/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconTrashConfig: ComponentConfig = {+ componentName: "TrashIcon",+ importPath: "@/components/remocn/icon-trash",+ 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-trash/index.tsx b/registry/remocn/icon-trash/index.tsxnew file mode 100644index 00000000..f9665f84--- /dev/null+++ b/registry/remocn/icon-trash/index.tsx@@ -0,0 +1,152 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const BODY_PATH = "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6";+const INNER1_PATH = "M10 11v6";+const INNER2_PATH = "M14 11v6";+const LID_PATH = "M3 6h18";+const HANDLE_PATH = "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2";++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 24,+ loop: false,+} as const;++export function TrashIcon({+ 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 bodyProgress = interpolate(linearDraw, [0, 0.714], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const innerProgress = interpolate(linearDraw, [0.571, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const lidProgress = interpolate(linearDraw, [0.714, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const body = drawnPathProps(BODY_PATH, bodyProgress);+ const inner1 = drawnPathProps(INNER1_PATH, innerProgress);+ const inner2 = drawnPathProps(INNER2_PATH, innerProgress);+ const lid = drawnPathProps(LID_PATH, lidProgress);+ const handle = drawnPathProps(HANDLE_PATH, lidProgress);++ const lidRotate = interpolate(actionProgress, [0, 0.4, 1], [0, -14, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const lidLift = interpolate(actionProgress, [0, 0.4, 1], [0, -1, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });++ 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={BODY_PATH}+ strokeDasharray={body.strokeDasharray}+ strokeDashoffset={body.strokeDashoffset}+ />+ <path+ d={INNER1_PATH}+ strokeDasharray={inner1.strokeDasharray}+ strokeDashoffset={inner1.strokeDashoffset}+ />+ <path+ d={INNER2_PATH}+ strokeDasharray={inner2.strokeDasharray}+ strokeDashoffset={inner2.strokeDashoffset}+ />+ <g transform={`translate(0 ${lidLift}) rotate(${lidRotate} 3 6)`}>+ <path+ d={LID_PATH}+ strokeDasharray={lid.strokeDasharray}+ strokeDashoffset={lid.strokeDashoffset}+ />+ <path+ d={HANDLE_PATH}+ strokeDasharray={handle.strokeDasharray}+ strokeDashoffset={handle.strokeDashoffset}+ />+ </g>+ </svg>+ );+}++export function TrashIconStatic({+ 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={INNER1_PATH} />+ <path d={INNER2_PATH} />+ <path d={BODY_PATH} />+ <path d={LID_PATH} />+ <path d={HANDLE_PATH} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex d797888b..f5924ce4 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -1533,6 +1533,21 @@"target": "components/remocn/icon-settings.tsx"}]+ },+ {+ "name": "icon-trash",+ "type": "registry:component",+ "title": "Trash",+ "description": "Animated Lucide trash-2 icon — the can draws on, then the lid flips open and the contents vanish for a delete or cleanup beat.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-trash/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-trash.tsx"+ }+ ]}]}