Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icons alert
dev_wandrydbc38c900407
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 7b892fd8..99079fd0 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -7,6 +7,7 @@ import { useEffect, useMemo, useRef, useState } from "react";import { usePrefersReducedMotion } from "@/lib/use-prefers-reduced-motion";import { cn } from "@/lib/utils";import registry, { type RegistryEntry } from "@/registry/__index__";+import { AlertTriangleIconStatic } from "@/registry/remocn/icon-alert-triangle";import { CheckCircleIconStatic } from "@/registry/remocn/icon-check-circle";import { CheckIconStatic } from "@/registry/remocn/icon-check";import { XIconStatic } from "@/registry/remocn/icon-x";@@ -47,6 +48,12 @@ export const ICONS: IconEntry[] = [category: "Status & feedback",Static: XIconStatic,},+ {+ name: "icon-alert-triangle",+ label: "Alert Triangle",+ category: "Status & feedback",+ Static: AlertTriangleIconStatic,+ },];const CATEGORY_ORDER: IconCategory[] = [diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex ac14a952..929208f6 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -24,6 +24,7 @@ import { githubStarsConfig } from "@/registry/remocn/github-stars/config";import { glassCodeBlockConfig } from "@/registry/remocn/glass-code-block/config";import { glassCodeWalkConfig } from "@/registry/remocn/glass-code-walk/config";import { grainDissolveConfig } from "@/registry/remocn/grain-dissolve/config";+import { iconAlertTriangleConfig } from "@/registry/remocn/icon-alert-triangle/config";import { iconCheckCircleConfig } from "@/registry/remocn/icon-check-circle/config";import { iconCheckConfig } from "@/registry/remocn/icon-check/config";import { iconXConfig } from "@/registry/remocn/icon-x/config";@@ -560,6 +561,13 @@ const registry: Record<string, RegistryEntry> = {})),config: grainDissolveConfig,},+ "icon-alert-triangle": {+ load: () =>+ import("@/registry/remocn/icon-alert-triangle").then((m) => ({+ default: m.AlertTriangleIcon,+ })),+ config: iconAlertTriangleConfig,+ },"icon-check": {load: () =>import("@/registry/remocn/icon-check").then((m) => ({diff --git a/registry/remocn/icon-alert-triangle/config.ts b/registry/remocn/icon-alert-triangle/config.tsnew file mode 100644index 00000000..b32f99f2--- /dev/null+++ b/registry/remocn/icon-alert-triangle/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconAlertTriangleConfig: ComponentConfig = {+ componentName: "AlertTriangleIcon",+ importPath: "@/components/remocn/icon-alert-triangle",+ 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-alert-triangle/index.tsx b/registry/remocn/icon-alert-triangle/index.tsxnew file mode 100644index 00000000..a46bc32a--- /dev/null+++ b/registry/remocn/icon-alert-triangle/index.tsx@@ -0,0 +1,138 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const TRIANGLE_PATH =+ "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3";+const STEM_PATH = "M12 9v4";+const DOT_PATH = "M12 17h.01";++const TIMINGS = {+ drawDurationInFrames: 16,+ actionDelayInFrames: 2,+ actionDurationInFrames: 24,+ loop: false,+} as const;++export function AlertTriangleIcon({+ animation = "both",+ loop,+ speed,+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: IconAnimationProps) {+ const { drawProgress, scaleIn, actionProgress } = useIconAnimation(+ { animation, loop, speed },+ TIMINGS,+ );++ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);++ const triangleProgress = interpolate(linearDraw, [0, 0.875], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const stemProgress = interpolate(linearDraw, [0.625, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const dotPop = interpolate(linearDraw, [0.85, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.back(1.8)),+ });++ const triangle = drawnPathProps(TRIANGLE_PATH, triangleProgress);+ const stem = drawnPathProps(STEM_PATH, stemProgress);++ const blinkOpacity = interpolate(+ actionProgress,+ [0, 0.2, 0.4, 0.6, 0.8],+ [1, 0.25, 1, 0.25, 1],+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },+ );+ const stemSquash = interpolate(+ actionProgress,+ [0, 0.2, 0.4, 0.6, 0.8],+ [1, 0.85, 1, 0.85, 1],+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },+ );++ 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})`,+ }}+ >+ <path+ d={TRIANGLE_PATH}+ strokeDasharray={triangle.strokeDasharray}+ strokeDashoffset={triangle.strokeDashoffset}+ />+ <g opacity={blinkOpacity}>+ <g transform={`translate(12 13) scale(1 ${stemSquash}) translate(-12 -13)`}>+ <path+ d={STEM_PATH}+ strokeDasharray={stem.strokeDasharray}+ strokeDashoffset={stem.strokeDashoffset}+ />+ </g>+ <g transform={`translate(12 17) scale(${dotPop}) translate(-12 -17)`}>+ <path d={DOT_PATH} />+ </g>+ </g>+ </svg>+ );+}++export function AlertTriangleIconStatic({+ 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={TRIANGLE_PATH} />+ <path d={STEM_PATH} />+ <path d={DOT_PATH} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex 43334f70..62a12add 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -1383,6 +1383,21 @@"target": "components/remocn/icon-x.tsx"}]+ },+ {+ "name": "icon-alert-triangle",+ "type": "registry:component",+ "title": "Alert Triangle",+ "description": "Animated Lucide triangle-alert icon — the outline draws on, the mark pops in, then the exclamation blinks to flag a risk or warning.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-alert-triangle/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-alert-triangle.tsx"+ }+ ]}]}