Skip to content

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

feat: icon setting

dev_wandryd65d13d519b0
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index 736bd8e3..1d99c68e 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -17,6 +17,7 @@ import { InfoIconStatic } from "@/registry/remocn/icon-info";
import { LoaderIconStatic } from "@/registry/remocn/icon-loader";
import { RefreshCwIconStatic } from "@/registry/remocn/icon-refresh-cw";
import { SearchIconStatic } from "@/registry/remocn/icon-search";
+import { SettingsIconStatic } from "@/registry/remocn/icon-settings";
import { UploadIconStatic } from "@/registry/remocn/icon-upload";
import { XIconStatic } from "@/registry/remocn/icon-x";
@@ -110,6 +111,12 @@ export const ICONS: IconEntry[] = [
category: "Actions & UI",
Static: CopyIconStatic,
},
+ {
+ name: "icon-settings",
+ label: "Settings",
+ category: "Actions & UI",
+ Static: SettingsIconStatic,
+ },
];
const CATEGORY_ORDER: IconCategory[] = [
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 2dfe0104..a24d4a58 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -34,6 +34,7 @@ import { iconInfoConfig } from "@/registry/remocn/icon-info/config";
import { iconLoaderConfig } from "@/registry/remocn/icon-loader/config";
import { iconRefreshCwConfig } from "@/registry/remocn/icon-refresh-cw/config";
import { iconSearchConfig } from "@/registry/remocn/icon-search/config";
+import { iconSettingsConfig } from "@/registry/remocn/icon-settings/config";
import { iconUploadConfig } from "@/registry/remocn/icon-upload/config";
import { iconXConfig } from "@/registry/remocn/icon-x/config";
import { infiniteBentoPanConfig } from "@/registry/remocn/infinite-bento-pan/config";
@@ -632,6 +633,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconSearchConfig,
},
+ "icon-settings": {
+ load: () =>
+ import("@/registry/remocn/icon-settings").then((m) => ({
+ default: m.SettingsIcon,
+ })),
+ config: iconSettingsConfig,
+ },
"icon-upload": {
load: () =>
import("@/registry/remocn/icon-upload").then((m) => ({
diff --git a/registry/remocn/icon-settings/config.ts b/registry/remocn/icon-settings/config.ts
new file mode 100644
index 00000000..62a53c2c
--- /dev/null
+++ b/registry/remocn/icon-settings/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconSettingsConfig: ComponentConfig = {
+ componentName: "SettingsIcon",
+ importPath: "@/components/remocn/icon-settings",
+ 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-settings/index.tsx b/registry/remocn/icon-settings/index.tsx
new file mode 100644
index 00000000..d7745625
--- /dev/null
+++ b/registry/remocn/icon-settings/index.tsx
@@ -0,0 +1,124 @@
+"use client";
+
+import { Easing, interpolate, spring, useVideoConfig } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const GEAR_PATH =
+ "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915";
+const CIRCLE_PATH =
+ "M12 9 A3 3 0 0 1 15 12 A3 3 0 0 1 12 15 A3 3 0 0 1 9 12 A3 3 0 0 1 12 9";
+
+const TIMINGS = {
+ drawDurationInFrames: 16,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 26,
+ loop: false,
+} as const;
+
+export function SettingsIcon({
+ animation = "both",
+ loop,
+ speed,
+ size = 48,
+ color = "currentColor",
+ strokeWidth = 2,
+ className,
+}: IconAnimationProps) {
+ const { drawProgress, scaleIn, actionFrame } = useIconAnimation(
+ { animation, loop, speed },
+ TIMINGS,
+ );
+ const { fps } = useVideoConfig();
+
+ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);
+
+ const gearProgress = interpolate(linearDraw, [0, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ });
+ const circleProgress = interpolate(linearDraw, [0.625, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const gear = drawnPathProps(GEAR_PATH, gearProgress);
+ const circle = drawnPathProps(CIRCLE_PATH, circleProgress);
+
+ const gearRotate =
+ 60 *
+ spring({
+ frame: actionFrame,
+ fps,
+ config: { damping: 14, stiffness: 120, mass: 0.9 },
+ durationInFrames: 26,
+ });
+
+ 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(${gearRotate} 12 12)`}>
+ <path
+ d={GEAR_PATH}
+ strokeDasharray={gear.strokeDasharray}
+ strokeDashoffset={gear.strokeDashoffset}
+ />
+ </g>
+ <path
+ d={CIRCLE_PATH}
+ strokeDasharray={circle.strokeDasharray}
+ strokeDashoffset={circle.strokeDashoffset}
+ />
+ </svg>
+ );
+}
+
+export function SettingsIconStatic({
+ 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={GEAR_PATH} />
+ <circle cx="12" cy="12" r="3" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 452386b8..d797888b 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -1518,6 +1518,21 @@
"target": "components/remocn/icon-copy.tsx"
}
]
+ },
+ {
+ "name": "icon-settings",
+ "type": "registry:component",
+ "title": "Settings",
+ "description": "Animated Lucide settings icon — the gear and center draw on, then the gear turns exactly one tooth for a settings, configuration, or customization beat.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-settings/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-settings.tsx"
+ }
+ ]
}
]
}