Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon credit cart
dev_wandry290048b12c62
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex ea768976..4c2fb844 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -28,6 +28,7 @@ import { ClockIconStatic } from "@/registry/remocn/icon-clock";import { CloudIconStatic } from "@/registry/remocn/icon-cloud";import { CodeIconStatic } from "@/registry/remocn/icon-code";import { CopyIconStatic } from "@/registry/remocn/icon-copy";+import { CreditCardIconStatic } from "@/registry/remocn/icon-credit-card";import { DatabaseIconStatic } from "@/registry/remocn/icon-database";import { DownloadIconStatic } from "@/registry/remocn/icon-download";import { ExternalLinkIconStatic } from "@/registry/remocn/icon-external-link";@@ -280,6 +281,12 @@ export const ICONS: IconEntry[] = [category: "Commerce",Static: ShoppingCartIconStatic,},+ {+ name: "icon-credit-card",+ label: "Credit Card",+ category: "Commerce",+ Static: CreditCardIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex b7c67d49..25975784 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -44,6 +44,7 @@ import { iconClockConfig } from "@/registry/remocn/icon-clock/config";import { iconCloudConfig } from "@/registry/remocn/icon-cloud/config";import { iconCodeConfig } from "@/registry/remocn/icon-code/config";import { iconCopyConfig } from "@/registry/remocn/icon-copy/config";+import { iconCreditCardConfig } from "@/registry/remocn/icon-credit-card/config";import { iconDatabaseConfig } from "@/registry/remocn/icon-database/config";import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";import { iconExternalLinkConfig } from "@/registry/remocn/icon-external-link/config";@@ -774,6 +775,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconCopyConfig,},+ "icon-credit-card": {+ load: () =>+ import("@/registry/remocn/icon-credit-card").then((m) => ({+ default: m.CreditCardIcon,+ })),+ config: iconCreditCardConfig,+ },"icon-database": {load: () =>import("@/registry/remocn/icon-database").then((m) => ({diff --git a/registry/remocn/icon-credit-card/config.ts b/registry/remocn/icon-credit-card/config.tsnew file mode 100644index 00000000..a6636099--- /dev/null+++ b/registry/remocn/icon-credit-card/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconCreditCardConfig: ComponentConfig = {+ componentName: "CreditCardIcon",+ importPath: "@/components/remocn/icon-credit-card",+ 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-credit-card/index.tsx b/registry/remocn/icon-credit-card/index.tsxnew file mode 100644index 00000000..e6e0fc0f--- /dev/null+++ b/registry/remocn/icon-credit-card/index.tsx@@ -0,0 +1,118 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const CARD_PATH =+ "M4 5H20A2 2 0 0 1 22 7V17A2 2 0 0 1 20 19H4A2 2 0 0 1 2 17V7A2 2 0 0 1 4 5Z";+const STRIPE_PATH = "M2 10H22";++const PIVOT_X = 12;+const PIVOT_Y = 19;++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 24,+ loop: false,+} as const;++export function CreditCardIcon({+ animation = "both",+ loop,+ speed,+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: IconAnimationProps) {+ const { drawProgress, scaleIn, actionProgress, actionFrame } =+ useIconAnimation({ animation, loop, speed }, TIMINGS);++ const acting = animation !== "draw" && actionFrame >= 0;++ const swipe = interpolate(actionProgress, [0.1, 0.45], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.cubic),+ });+ const tilt = acting+ ? interpolate(actionProgress, [0.4, 0.6, 1], [0, 4, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 0;++ const stripeProgress = animation === "draw" ? 1 : acting ? swipe : 0;++ const card = drawnPathProps(CARD_PATH, drawProgress);+ const stripe = drawnPathProps(STRIPE_PATH, stripeProgress);++ 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})`,+ }}+ >+ <g transform={`rotate(${tilt} ${PIVOT_X} ${PIVOT_Y})`}>+ <path+ d={CARD_PATH}+ strokeDasharray={card.strokeDasharray}+ strokeDashoffset={card.strokeDashoffset}+ />+ <path+ d={STRIPE_PATH}+ strokeDasharray={stripe.strokeDasharray}+ strokeDashoffset={stripe.strokeDashoffset}+ />+ </g>+ </svg>+ );+}++export function CreditCardIconStatic({+ 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"+ >+ <rect width="20" height="14" x="2" y="5" rx="2" />+ <line x1="2" x2="22" y1="10" y2="10" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 79f3579f..7dd2ca1b 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2509,6 +2509,21 @@}]},+ {+ "name": "icon-credit-card",+ "type": "registry:component",+ "title": "Credit Card",+ "description": "Animated Lucide credit-card icon — the card draws on, then the stripe swipes through and the card tips: payment accepted.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-credit-card/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-credit-card.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",