Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: icon award

dev_wandryc8f96d225195
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index c9e8ef6e..df71a50c 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -15,6 +15,7 @@ import { ArrowLeftIconStatic } from "@/registry/remocn/icon-arrow-left";
import { ArrowRightIconStatic } from "@/registry/remocn/icon-arrow-right";
import { ArrowUpIconStatic } from "@/registry/remocn/icon-arrow-up";
import { AtSignIconStatic } from "@/registry/remocn/icon-at-sign";
+import { AwardIconStatic } from "@/registry/remocn/icon-award";
import { BarChart3IconStatic } from "@/registry/remocn/icon-bar-chart-3";
import { BellIconStatic } from "@/registry/remocn/icon-bell";
import { BookmarkIconStatic } from "@/registry/remocn/icon-bookmark";
@@ -623,6 +624,12 @@ export const ICONS: IconEntry[] = [
category: "Emotion & accents",
Static: TrophyIconStatic,
},
+ {
+ name: "icon-award",
+ label: "Award",
+ category: "Emotion & accents",
+ Static: AwardIconStatic,
+ },
{
name: "icon-star",
label: "Star",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 6bd5ce82..67a1f168 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -31,6 +31,7 @@ import { iconArrowLeftConfig } from "@/registry/remocn/icon-arrow-left/config";
import { iconArrowRightConfig } from "@/registry/remocn/icon-arrow-right/config";
import { iconArrowUpConfig } from "@/registry/remocn/icon-arrow-up/config";
import { iconAtSignConfig } from "@/registry/remocn/icon-at-sign/config";
+import { iconAwardConfig } from "@/registry/remocn/icon-award/config";
import { iconBarChart3Config } from "@/registry/remocn/icon-bar-chart-3/config";
import { iconBellConfig } from "@/registry/remocn/icon-bell/config";
import { iconBookmarkConfig } from "@/registry/remocn/icon-bookmark/config";
@@ -703,6 +704,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconAtSignConfig,
},
+ "icon-award": {
+ load: () =>
+ import("@/registry/remocn/icon-award").then((m) => ({
+ default: m.AwardIcon,
+ })),
+ config: iconAwardConfig,
+ },
"icon-bar-chart-3": {
load: () =>
import("@/registry/remocn/icon-bar-chart-3").then((m) => ({
diff --git a/registry/remocn/icon-award/config.ts b/registry/remocn/icon-award/config.ts
new file mode 100644
index 00000000..19f44d30
--- /dev/null
+++ b/registry/remocn/icon-award/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconAwardConfig: ComponentConfig = {
+ componentName: "AwardIcon",
+ importPath: "@/components/remocn/icon-award",
+ 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-award/index.tsx b/registry/remocn/icon-award/index.tsx
new file mode 100644
index 00000000..588a1aa2
--- /dev/null
+++ b/registry/remocn/icon-award/index.tsx
@@ -0,0 +1,135 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const MEDAL_PATH = "M12 2a6 6 0 1 0 0 12 6 6 0 1 0 0-12Z";
+const RIBBON_PATH =
+ "m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526";
+
+const MEDAL_CX = 12;
+const MEDAL_CY = 8;
+const PIVOT_X = 12;
+const PIVOT_Y = 2;
+
+const TIMINGS = {
+ drawDurationInFrames: 14,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 30,
+ loop: false,
+} as const;
+
+export function AwardIcon({
+ 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 ribbonDraw = acting
+ ? interpolate(actionProgress, [0.05, 0.4], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ })
+ : 0;
+ const pop = acting
+ ? interpolate(actionProgress, [0.35, 0.55, 1], [1, 1.15, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+ const swing = acting
+ ? interpolate(
+ actionProgress,
+ [0.35, 0.5, 0.65, 0.8, 1],
+ [0, 4, -3, 1.5, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.sin),
+ },
+ )
+ : 0;
+
+ const medal = drawnPathProps(MEDAL_PATH, acting ? 1 : drawProgress);
+ const ribbon = drawnPathProps(RIBBON_PATH, ribbonDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const popTransform = `translate(${MEDAL_CX * (1 - pop)} ${MEDAL_CY * (1 - pop)}) scale(${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})`,
+ }}
+ >
+ <g transform={`rotate(${swing} ${PIVOT_X} ${PIVOT_Y})`}>
+ <path
+ d={RIBBON_PATH}
+ strokeDasharray={ribbon.strokeDasharray}
+ strokeDashoffset={ribbon.strokeDashoffset}
+ />
+ <g transform={popTransform}>
+ <path
+ d={MEDAL_PATH}
+ strokeDasharray={medal.strokeDasharray}
+ strokeDashoffset={medal.strokeDashoffset}
+ />
+ </g>
+ </g>
+ </svg>
+ );
+}
+
+export function AwardIconStatic({
+ 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="m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526" />
+ <circle cx="12" cy="8" r="6" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 8a0b72d1..98dc4614 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2644,6 +2644,21 @@
}
]
},
+ {
+ "name": "icon-award",
+ "type": "registry:component",
+ "title": "Award",
+ "description": "Animated Lucide award icon — the medal draws on, the ribbon unfurls beneath it, then the medal swings to rest.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-award/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-award.tsx"
+ }
+ ]
+ },
{
"name": "icon-bar-chart-3",
"type": "registry:component",