Skip to content

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

feat: icon db

dev_wandryb7f8eca5c1a7
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsx
index e0e6e9d1..a7dbc027 100644
--- a/components/docs/icons-gallery.tsx
+++ b/components/docs/icons-gallery.tsx
@@ -27,6 +27,7 @@ import { ChevronUpIconStatic } from "@/registry/remocn/icon-chevron-up";
import { ClockIconStatic } from "@/registry/remocn/icon-clock";
import { CodeIconStatic } from "@/registry/remocn/icon-code";
import { CopyIconStatic } from "@/registry/remocn/icon-copy";
+import { DatabaseIconStatic } from "@/registry/remocn/icon-database";
import { DownloadIconStatic } from "@/registry/remocn/icon-download";
import { ExternalLinkIconStatic } from "@/registry/remocn/icon-external-link";
import { EyeOffIconStatic } from "@/registry/remocn/icon-eye-off";
@@ -224,6 +225,12 @@ export const ICONS: IconEntry[] = [
category: "Files & dev",
Static: TerminalIconStatic,
},
+ {
+ name: "icon-database",
+ label: "Database",
+ category: "Files & dev",
+ Static: DatabaseIconStatic,
+ },
{
name: "icon-search",
label: "Search",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index b33d46cd..708727f2 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -43,6 +43,7 @@ import { iconChevronUpConfig } from "@/registry/remocn/icon-chevron-up/config";
import { iconClockConfig } from "@/registry/remocn/icon-clock/config";
import { iconCodeConfig } from "@/registry/remocn/icon-code/config";
import { iconCopyConfig } from "@/registry/remocn/icon-copy/config";
+import { iconDatabaseConfig } from "@/registry/remocn/icon-database/config";
import { iconDownloadConfig } from "@/registry/remocn/icon-download/config";
import { iconExternalLinkConfig } from "@/registry/remocn/icon-external-link/config";
import { iconEyeOffConfig } from "@/registry/remocn/icon-eye-off/config";
@@ -759,6 +760,13 @@ const registry: Record<string, RegistryEntry> = {
})),
config: iconCopyConfig,
},
+ "icon-database": {
+ load: () =>
+ import("@/registry/remocn/icon-database").then((m) => ({
+ default: m.DatabaseIcon,
+ })),
+ config: iconDatabaseConfig,
+ },
"icon-download": {
load: () =>
import("@/registry/remocn/icon-download").then((m) => ({
diff --git a/registry/remocn/icon-database/config.ts b/registry/remocn/icon-database/config.ts
new file mode 100644
index 00000000..40750136
--- /dev/null
+++ b/registry/remocn/icon-database/config.ts
@@ -0,0 +1,44 @@
+import { type ComponentConfig, FPS } from "@/lib/customizer-config";
+
+export const iconDatabaseConfig: ComponentConfig = {
+ componentName: "DatabaseIcon",
+ importPath: "@/components/remocn/icon-database",
+ 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: 80,
+ fps: FPS,
+ compositionWidth: 48,
+ compositionHeight: 48,
+};
diff --git a/registry/remocn/icon-database/index.tsx b/registry/remocn/icon-database/index.tsx
new file mode 100644
index 00000000..bb81fcb8
--- /dev/null
+++ b/registry/remocn/icon-database/index.tsx
@@ -0,0 +1,145 @@
+"use client";
+
+import { Easing, interpolate } from "remotion";
+import {
+ drawnPathProps,
+ type IconAnimationProps,
+ useIconAnimation,
+} from "@/lib/remocn-icons";
+
+const DISC_PATH = "M3 5A9 3 0 0 0 21 5A9 3 0 0 0 3 5Z";
+const BODY_PATH = "M3 5V19A9 3 0 0 0 21 19V5";
+const MID_PATH = "M3 12A9 3 0 0 0 21 12";
+
+const DISC_CX = 12;
+const DISC_CY = 5;
+
+const TIMINGS = {
+ drawDurationInFrames: 18,
+ actionDelayInFrames: 2,
+ actionDurationInFrames: 24,
+ loop: false,
+} as const;
+
+export function DatabaseIcon({
+ 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 discDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const bodyDraw = interpolate(linearDraw, [0.35, 0.75], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+ const midDraw = interpolate(linearDraw, [0.6, 1], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.out(Easing.quad),
+ });
+
+ const discPop = acting
+ ? interpolate(actionProgress, [0, 0.25, 0.5], [1, 1.06, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 1;
+ const midDip = acting
+ ? interpolate(actionProgress, [0.25, 0.5, 0.8], [0, 1.5, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: Easing.inOut(Easing.quad),
+ })
+ : 0;
+
+ const disc = drawnPathProps(DISC_PATH, acting ? 1 : discDraw);
+ const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);
+ const mid = drawnPathProps(MID_PATH, acting ? 1 : midDraw);
+
+ const scale = 0.85 + 0.15 * scaleIn;
+ const discTransform = `translate(${DISC_CX * (1 - discPop)} ${DISC_CY * (1 - discPop)}) scale(${discPop})`;
+
+ 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={BODY_PATH}
+ strokeDasharray={body.strokeDasharray}
+ strokeDashoffset={body.strokeDashoffset}
+ />
+ <g transform={`translate(0 ${midDip})`}>
+ <path
+ d={MID_PATH}
+ strokeDasharray={mid.strokeDasharray}
+ strokeDashoffset={mid.strokeDashoffset}
+ />
+ </g>
+ <g transform={discTransform}>
+ <path
+ d={DISC_PATH}
+ strokeDasharray={disc.strokeDasharray}
+ strokeDashoffset={disc.strokeDashoffset}
+ />
+ </g>
+ </svg>
+ );
+}
+
+export function DatabaseIconStatic({
+ 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"
+ >
+ <ellipse cx="12" cy="5" rx="9" ry="3" />
+ <path d="M3 5V19A9 3 0 0 0 21 19V5" />
+ <path d="M3 12A9 3 0 0 0 21 12" />
+ </svg>
+ );
+}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index bb79c883..3c58b4f7 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -2389,6 +2389,21 @@
}
]
},
+ {
+ "name": "icon-database",
+ "type": "registry:component",
+ "title": "Database",
+ "description": "Animated Lucide database icon — the cylinder draws on, then a write lands: the top disc pops and data settles down the stack.",
+ "dependencies": ["remotion"],
+ "registryDependencies": ["@remocn/icons-core"],
+ "files": [
+ {
+ "path": "icon-database/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/icon-database.tsx"
+ }
+ ]
+ },
{
"name": "icon-user",
"type": "registry:component",