Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon circle plus
dev_wandry86b9f812ce58
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 5031fb05..2c53b243 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -53,6 +53,7 @@ import { PencilIconStatic } from "@/registry/remocn/icon-pencil";import { PhoneIconStatic } from "@/registry/remocn/icon-phone";import { PlayIconStatic } from "@/registry/remocn/icon-play";import { PlusIconStatic } from "@/registry/remocn/icon-plus";+import { PlusCircleIconStatic } from "@/registry/remocn/icon-plus-circle";import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";import { SaveIconStatic } from "@/registry/remocn/icon-save";import { SearchIconStatic } from "@/registry/remocn/icon-search";@@ -154,6 +155,12 @@ export const ICONS: IconEntry[] = [category: "Status & feedback",Static: HelpCircleIconStatic,},+ {+ name: "icon-plus-circle",+ label: "Plus Circle",+ category: "Status & feedback",+ Static: PlusCircleIconStatic,+ },{name: "icon-search",label: "Search",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 646468e7..966cd0d7 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -68,6 +68,7 @@ import { iconPauseConfig } from "@/registry/remocn/icon-pause/config";import { iconPencilConfig } from "@/registry/remocn/icon-pencil/config";import { iconPhoneConfig } from "@/registry/remocn/icon-phone/config";import { iconPlayConfig } from "@/registry/remocn/icon-play/config";+import { iconPlusCircleConfig } from "@/registry/remocn/icon-plus-circle/config";import { iconPlusConfig } from "@/registry/remocn/icon-plus/config";import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";import { iconSaveConfig } from "@/registry/remocn/icon-save/config";@@ -931,6 +932,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconPlusConfig,},+ "icon-plus-circle": {+ load: () =>+ import("@/registry/remocn/icon-plus-circle").then((m) => ({+ default: m.PlusCircleIcon,+ })),+ config: iconPlusCircleConfig,+ },"icon-refresh-cw": {load: () =>import("@/registry/remocn/icon-refresh-cw").then((m) => ({diff --git a/registry/remocn/icon-plus-circle/config.ts b/registry/remocn/icon-plus-circle/config.tsnew file mode 100644index 00000000..2dc3998b--- /dev/null+++ b/registry/remocn/icon-plus-circle/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconPlusCircleConfig: ComponentConfig = {+ componentName: "PlusCircleIcon",+ importPath: "@/components/remocn/icon-plus-circle",+ 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-plus-circle/index.tsx b/registry/remocn/icon-plus-circle/index.tsxnew file mode 100644index 00000000..8ecfd7a9--- /dev/null+++ b/registry/remocn/icon-plus-circle/index.tsx@@ -0,0 +1,126 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const RING_PATH = "M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z";+const H_PATH = "M8 12h8";+const V_PATH = "M12 8v8";++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 20,+ loop: false,+} as const;++export function PlusCircleIcon({+ 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 hDraw = interpolate(actionProgress, [0.1, 0.4], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const vDraw = interpolate(actionProgress, [0.25, 0.55], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const pop = acting+ ? interpolate(actionProgress, [0.55, 0.75, 1], [1, 1.06, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;++ const hProgress = animation === "draw" ? 1 : acting ? hDraw : 0;+ const vProgress = animation === "draw" ? 1 : acting ? vDraw : 0;++ const ring = drawnPathProps(RING_PATH, drawProgress);+ const h = drawnPathProps(H_PATH, hProgress);+ const v = drawnPathProps(V_PATH, vProgress);++ const scale = (0.85 + 0.15 * scaleIn) * pop;++ 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={RING_PATH}+ strokeDasharray={ring.strokeDasharray}+ strokeDashoffset={ring.strokeDashoffset}+ />+ <path+ d={H_PATH}+ strokeDasharray={h.strokeDasharray}+ strokeDashoffset={h.strokeDashoffset}+ />+ <path+ d={V_PATH}+ strokeDasharray={v.strokeDasharray}+ strokeDashoffset={v.strokeDashoffset}+ />+ </svg>+ );+}++export function PlusCircleIconStatic({+ 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="12" cy="12" r="10" />+ <path d={H_PATH} />+ <path d={V_PATH} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 95619baa..a2000d93 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2239,6 +2239,21 @@}]},+ {+ "name": "icon-plus-circle",+ "type": "registry:component",+ "title": "Plus Circle",+ "description": "Animated Lucide plus-circle icon — the ring draws on, the plus crosses in, then the whole badge pops.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-plus-circle/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-plus-circle.tsx"+ }+ ]+ },{"name": "icon-user","type": "registry:component",