Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon smartphone
dev_wandryf4ea0a8e975d
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex b57e7b5f..a844f8df 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -72,6 +72,7 @@ import { Share2IconStatic } from "@/registry/remocn/icon-share-2";import { SettingsIconStatic } from "@/registry/remocn/icon-settings";import { ShieldIconStatic } from "@/registry/remocn/icon-shield";import { SkipForwardIconStatic } from "@/registry/remocn/icon-skip-forward";+import { SmartphoneIconStatic } from "@/registry/remocn/icon-smartphone";import { SparklesIconStatic } from "@/registry/remocn/icon-sparkles";import { StarIconStatic } from "@/registry/remocn/icon-star";import { TerminalIconStatic } from "@/registry/remocn/icon-terminal";@@ -252,6 +253,12 @@ export const ICONS: IconEntry[] = [category: "Devices & theme",Static: MonitorIconStatic,},+ {+ name: "icon-smartphone",+ label: "Smartphone",+ category: "Devices & theme",+ Static: SmartphoneIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 22ca5ef2..7709e2a6 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -88,6 +88,7 @@ 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 { iconSkipForwardConfig } from "@/registry/remocn/icon-skip-forward/config";+import { iconSmartphoneConfig } from "@/registry/remocn/icon-smartphone/config";import { iconSparklesConfig } from "@/registry/remocn/icon-sparkles/config";import { iconStarConfig } from "@/registry/remocn/icon-star/config";import { iconTerminalConfig } from "@/registry/remocn/icon-terminal/config";@@ -1078,6 +1079,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconSkipForwardConfig,},+ "icon-smartphone": {+ load: () =>+ import("@/registry/remocn/icon-smartphone").then((m) => ({+ default: m.SmartphoneIcon,+ })),+ config: iconSmartphoneConfig,+ },"icon-sparkles": {load: () =>import("@/registry/remocn/icon-sparkles").then((m) => ({diff --git a/registry/remocn/icon-smartphone/config.ts b/registry/remocn/icon-smartphone/config.tsnew file mode 100644index 00000000..da07f44e--- /dev/null+++ b/registry/remocn/icon-smartphone/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconSmartphoneConfig: ComponentConfig = {+ componentName: "SmartphoneIcon",+ importPath: "@/components/remocn/icon-smartphone",+ 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-smartphone/index.tsx b/registry/remocn/icon-smartphone/index.tsxnew file mode 100644index 00000000..81a0eb78--- /dev/null+++ b/registry/remocn/icon-smartphone/index.tsx@@ -0,0 +1,127 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const BODY_PATH =+ "M7 2H17A2 2 0 0 1 19 4V20A2 2 0 0 1 17 22H7A2 2 0 0 1 5 20V4A2 2 0 0 1 7 2Z";+const BUTTON_PATH = "M12 18h.01";++const CENTER = 12;++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 18,+ loop: false,+} as const;++export function SmartphoneIcon({+ 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 buttonDraw = interpolate(linearDraw, [0.7, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const buzz = acting+ ? interpolate(+ actionProgress,+ [0, 0.2, 0.45, 0.7, 0.9, 1],+ [0, 3, -3, 2, -1, 0],+ {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ },+ )+ : 0;++ const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);+ const button = drawnPathProps(BUTTON_PATH, acting ? 1 : buttonDraw);++ 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(${buzz} ${CENTER} ${CENTER})`}>+ <path+ d={BODY_PATH}+ strokeDasharray={body.strokeDasharray}+ strokeDashoffset={body.strokeDashoffset}+ />+ <path+ d={BUTTON_PATH}+ strokeDasharray={button.strokeDasharray}+ strokeDashoffset={button.strokeDashoffset}+ />+ </g>+ </svg>+ );+}++export function SmartphoneIconStatic({+ 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="14" height="20" x="5" y="2" rx="2" ry="2" />+ <path d="M12 18h.01" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 5284128d..59e0318d 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2449,6 +2449,21 @@}]},+ {+ "name": "icon-smartphone",+ "type": "registry:component",+ "title": "Smartphone",+ "description": "Animated Lucide smartphone icon — draws on, then buzzes: three fast vibration oscillations.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-smartphone/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-smartphone.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",