Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: added icon check
dev_wandry03dc2802d5ee
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex e3db619b..8a54013c 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 { CheckIconStatic } from "@/registry/remocn/icon-check";export type IconCategory =| "Status & feedback"@@ -25,7 +26,14 @@ export interface IconEntry {}>;}-export const ICONS: IconEntry[] = [];+export const ICONS: IconEntry[] = [+ {+ name: "icon-check",+ label: "Check",+ category: "Status & feedback",+ Static: CheckIconStatic,+ },+];const CATEGORY_ORDER: IconCategory[] = ["Status & feedback",@@ -119,8 +127,8 @@ function IconTile({}) {const reducedMotion = usePrefersReducedMotion();const [copied, setCopied] = useState(false);- const entry = registry[`icon-${icon.name}`];- const command = `npx shadcn@latest add @remocn/icon-${icon.name}`;+ const entry = registry[icon.name];+ const command = `npx shadcn@latest add @remocn/${icon.name}`;const playing = active && !reducedMotion && Boolean(entry);const Static = icon.Static;diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 13891867..d5855249 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 { iconCheckConfig } from "@/registry/remocn/icon-check/config";import { infiniteBentoPanConfig } from "@/registry/remocn/infinite-bento-pan/config";import { infiniteMarqueeConfig } from "@/registry/remocn/infinite-marquee/config";import { inlineHighlightConfig } from "@/registry/remocn/inline-highlight/config";@@ -557,6 +558,13 @@ const registry: Record<string, RegistryEntry> = {})),config: grainDissolveConfig,},+ "icon-check": {+ load: () =>+ import("@/registry/remocn/icon-check").then((m) => ({+ default: m.CheckIcon,+ })),+ config: iconCheckConfig,+ },"wave-wipe": {load: () =>import("@/components/docs/examples/wave-wipe-example").then((m) => ({diff --git a/registry/remocn/icon-check/config.ts b/registry/remocn/icon-check/config.tsnew file mode 100644index 00000000..cc48f451--- /dev/null+++ b/registry/remocn/icon-check/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconCheckConfig: ComponentConfig = {+ componentName: "CheckIcon",+ importPath: "@/components/remocn/icon-check",+ 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: 60,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-check/index.tsx b/registry/remocn/icon-check/index.tsxnew file mode 100644index 00000000..349da0c4--- /dev/null+++ b/registry/remocn/icon-check/index.tsx@@ -0,0 +1,97 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const CHECK_PATH = "M4 12 9 17 20 6";++const TIMINGS = {+ drawDurationInFrames: 14,+ actionDelayInFrames: 2,+ actionDurationInFrames: 18,+ loop: false,+} as const;++export function CheckIcon({+ animation = "both",+ loop,+ speed,+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: IconAnimationProps) {+ const { drawProgress, scaleIn, actionProgress } = useIconAnimation(+ { animation, loop, speed },+ TIMINGS,+ );++ const dash = drawnPathProps(CHECK_PATH, drawProgress);+ const pop = interpolate(actionProgress, [0, 0.4, 1], [0, 1, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ });+ const rotate = interpolate(actionProgress, [0, 0.5], [-4, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ });+ const scale = (0.85 + 0.15 * scaleIn) * (1 + 0.18 * 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: `rotate(${rotate}deg) scale(${scale})`,+ }}+ >+ <path+ d={CHECK_PATH}+ strokeDasharray={dash.strokeDasharray}+ strokeDashoffset={dash.strokeDashoffset}+ />+ </svg>+ );+}++export function CheckIconStatic({+ 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={CHECK_PATH} />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex fedf1129..af17aa3f 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -1338,6 +1338,21 @@"target": "components/remocn/logo-enter.tsx"}]+ },+ {+ "name": "icon-check",+ "type": "registry:component",+ "title": "Check",+ "description": "Animated Lucide check icon — the stroke draws on, then stamps with a spring pop to mark a step, task, or claim as done.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-check/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-check.tsx"+ }+ ]}]}