Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon shopping cart
dev_wandryd29bfb4962f1
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 04a0e692..ea768976 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -72,6 +72,7 @@ import { SendIconStatic } from "@/registry/remocn/icon-send";import { Share2IconStatic } from "@/registry/remocn/icon-share-2";import { SettingsIconStatic } from "@/registry/remocn/icon-settings";import { ShieldIconStatic } from "@/registry/remocn/icon-shield";+import { ShoppingCartIconStatic } from "@/registry/remocn/icon-shopping-cart";import { SkipForwardIconStatic } from "@/registry/remocn/icon-skip-forward";import { SmartphoneIconStatic } from "@/registry/remocn/icon-smartphone";import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";@@ -273,6 +274,12 @@ export const ICONS: IconEntry[] = [category: "Devices & theme",Static: MoonIconStatic,},+ {+ name: "icon-shopping-cart",+ label: "Shopping Cart",+ category: "Commerce",+ Static: ShoppingCartIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex a028ab68..b7c67d49 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -88,6 +88,7 @@ import { iconSendConfig } from "@/registry/remocn/icon-send/config";import { iconSettingsConfig } from "@/registry/remocn/icon-settings/config";import { iconShare2Config } from "@/registry/remocn/icon-share-2/config";import { iconShieldConfig } from "@/registry/remocn/icon-shield/config";+import { iconShoppingCartConfig } from "@/registry/remocn/icon-shopping-cart/config";import { iconSkipForwardConfig } from "@/registry/remocn/icon-skip-forward/config";import { iconSmartphoneConfig } from "@/registry/remocn/icon-smartphone/config";import { iconSparklesConfig } from "@/registry/remocn/icon-sparkles/config";@@ -1081,6 +1082,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconShieldConfig,},+ "icon-shopping-cart": {+ load: () =>+ import("@/registry/remocn/icon-shopping-cart").then((m) => ({+ default: m.ShoppingCartIcon,+ })),+ config: iconShoppingCartConfig,+ },"icon-skip-forward": {load: () =>import("@/registry/remocn/icon-skip-forward").then((m) => ({diff --git a/registry/remocn/icon-shopping-cart/config.ts b/registry/remocn/icon-shopping-cart/config.tsnew file mode 100644index 00000000..a23d537b--- /dev/null+++ b/registry/remocn/icon-shopping-cart/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconShoppingCartConfig: ComponentConfig = {+ componentName: "ShoppingCartIcon",+ importPath: "@/components/remocn/icon-shopping-cart",+ 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-shopping-cart/index.tsx b/registry/remocn/icon-shopping-cart/index.tsxnew file mode 100644index 00000000..560415d1--- /dev/null+++ b/registry/remocn/icon-shopping-cart/index.tsx@@ -0,0 +1,159 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const BODY_PATH =+ "M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12";+const BACK_WHEEL_PATH = "M8 20a1 1 0 1 0 0 2 1 1 0 1 0 0-2Z";+const FRONT_WHEEL_PATH = "M19 20a1 1 0 1 0 0 2 1 1 0 1 0 0-2Z";++const BACK_CX = 8;+const FRONT_CX = 19;+const WHEEL_CY = 21;++const TIMINGS = {+ drawDurationInFrames: 16,+ actionDelayInFrames: 2,+ actionDurationInFrames: 26,+ loop: false,+} as const;++export function ShoppingCartIcon({+ 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.7], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const wheelsDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const rollX = acting+ ? interpolate(actionProgress, [0, 0.4, 0.7], [0, 4, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;+ const tilt = acting+ ? interpolate(actionProgress, [0, 0.4, 0.7], [0, -1, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;+ const backPop = acting+ ? interpolate(actionProgress, [0.5, 0.65, 0.85], [1, 1.2, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;+ const frontPop = acting+ ? interpolate(actionProgress, [0.6, 0.75, 0.95], [1, 1.2, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;++ const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);+ const backWheel = drawnPathProps(BACK_WHEEL_PATH, acting ? 1 : wheelsDraw);+ const frontWheel = drawnPathProps(FRONT_WHEEL_PATH, acting ? 1 : wheelsDraw);++ const scale = 0.85 + 0.15 * scaleIn;+ const backTransform = `translate(${BACK_CX * (1 - backPop)} ${WHEEL_CY * (1 - backPop)}) scale(${backPop})`;+ const frontTransform = `translate(${FRONT_CX * (1 - frontPop)} ${WHEEL_CY * (1 - frontPop)}) scale(${frontPop})`;++ 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})`,+ }}+ >+ <g transform={`translate(${rollX} 0) rotate(${tilt} 12 12)`}>+ <path+ d={BODY_PATH}+ strokeDasharray={body.strokeDasharray}+ strokeDashoffset={body.strokeDashoffset}+ />+ <g transform={backTransform}>+ <path+ d={BACK_WHEEL_PATH}+ strokeDasharray={backWheel.strokeDasharray}+ strokeDashoffset={backWheel.strokeDashoffset}+ />+ </g>+ <g transform={frontTransform}>+ <path+ d={FRONT_WHEEL_PATH}+ strokeDasharray={frontWheel.strokeDasharray}+ strokeDashoffset={frontWheel.strokeDashoffset}+ />+ </g>+ </g>+ </svg>+ );+}++export function ShoppingCartIconStatic({+ 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"+ >+ <circle cx="8" cy="21" r="1" />+ <circle cx="19" cy="21" r="1" />+ <path d={BODY_PATH} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 8a343904..79f3579f 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2494,6 +2494,21 @@}]},+ {+ "name": "icon-shopping-cart",+ "type": "registry:component",+ "title": "Shopping Cart",+ "description": "Animated Lucide shopping-cart icon — draws on, then rolls forward to checkout, wheels popping as it stops.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-shopping-cart/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-shopping-cart.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",