Skip to content

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

feat: crown

dev_wandrye71e21d6d3e0
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index df71a50c..c52bfe1d 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -32,6 +32,7 @@ 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 { CrownIconStatic } from "@/registry/remocn/icon-crown";
import { DatabaseIconStatic } from "@/registry/remocn/icon-database";
import { DollarSignIconStatic } from "@/registry/remocn/icon-dollar-sign";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
@@ -630,6 +631,12 @@ export const ICONS: IconEntry[] = [
category: "Emotion & accents",
Static: AwardIconStatic,
},
+ {
+ name: "icon-crown",
+ label: "Crown",
+ category: "Emotion & accents",
+ Static: CrownIconStatic,
+ },
{
name: "icon-star",
label: "Star",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 67a1f168..3128d937 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -48,6 +48,7 @@ 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 { iconCrownConfig } from "@/registry/remocn/icon-crown/config";
import { iconDatabaseConfig } from "@/registry/remocn/icon-database/config";
import { iconDollarSignConfig } from "@/registry/remocn/icon-dollar-sign/config";
import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
@@ -816,6 +817,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconCreditCardConfig,
},
+ "icon-crown": {
+ load: () =>
+ import("@/registry/remocn/icon-crown").then((m) => ({
+ default: m.CrownIcon,
+ })),
+ config: iconCrownConfig,
+ },
"icon-database": {
load: () =>
import("@/registry/remocn/icon-database").then((m) => ({
diff --git a/registry/remocn/icon-crown/config.ts b/registry/remocn/icon-crown/config.ts
new file mode 100644
index 00000000..93c6cc0b
--- /dev/null
+++ b/registry/remocn/icon-crown/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconCrownConfig: ComponentConfig = {
+ componentName: "CrownIcon",
+ importPath: "@/components/remocn/icon-crown",
+ 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-crown/index.tsx b/registry/remocn/icon-crown/index.tsx
new file mode 100644
index 00000000..d11c6eae
--- /dev/null
+++ b/registry/remocn/icon-crown/index.tsx
@@ -0,0 +1,143 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const CROWN_PATH =
+ "M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z";
+const BAND_PATH = "M5 21h14";
+
+const BASE_X = 12;
+const BASE_Y = 21;
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 28,
+ loop: false,
+} as const;
+
+export function CrownIcon({
+ 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 crownDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const bandDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const descend = acting
+ ? interpolate(actionProgress, [0, 0.22, 0.55], [0, -3, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.sin),
+ })
+ : 0;
+ const pop = acting
+ ? interpolate(actionProgress, [0.4, 0.55, 0.7], [1, 1.06, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+ const rock = acting
+ ? interpolate(
+ actionProgress,
+ [0.55, 0.68, 0.82, 0.94, 1],
+ [0, 2, -1.5, 0.8, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.sin),
+ },
+ )
+ : 0;
+
+ const crown = drawnPathProps(CROWN_PATH, acting ? 1 : crownDraw);
+ const band = drawnPathProps(BAND_PATH, acting ? 1 : bandDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const actionTransform = `translate(0 ${descend}) rotate(${rock} ${BASE_X} ${BASE_Y}) translate(${BASE_X * (1 - pop)} ${BASE_Y * (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={actionTransform}>
+ <path
+ d={CROWN_PATH}
+ strokeDasharray={crown.strokeDasharray}
+ strokeDashoffset={crown.strokeDashoffset}
+ />
+ <path
+ d={BAND_PATH}
+ strokeDasharray={band.strokeDasharray}
+ strokeDashoffset={band.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function CrownIconStatic({
+ 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="M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z" />
+ <path d="M5 21h14" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 98dc4614..aae8224e 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2569,6 +2569,21 @@
}
]
},
+ {
+ "name": "icon-crown",
+ "type": "registry:component",
+ "title": "Crown",
+ "description": "Animated Lucide crown icon — descends into place from above, lands with a pop, then rocks regally to rest.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-crown/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-crown.tsx"
+ }
+ ]
+ },
{
"name": "icon-dollar-sign",
"type": "registry:component",