Skip to content

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

feat: added blurIn for card, card title

dev_wandry920b83f70399
diff --git a/components/docs/examples/blocks/index.tsx b/components/docs/examples/blocks/index.tsx
index fc97a68f..fcd64c97 100644
--- a/components/docs/examples/blocks/index.tsx
+++ b/components/docs/examples/blocks/index.tsx
@@ -51,8 +51,9 @@ export const blockExamples: Record<string, BlockExampleEntry> = {
"signup-flow": {
Component: SignupFlowExampleScene,
code: signupFlowExampleCode,
- // Toast dismiss 300 + 14 + ~16 settle (signup card fill → submit → toast).
- durationInFrames: 330,
+ // blur-in entrance (card → header → fields → button, ~0–64) → cursor demo
+ // (+DEMO 48) → toast dismiss 348 + 14 + ~18 settle.
+ durationInFrames: 380,
fps: FPS,
width: W,
height: H,
diff --git a/registry/remocn-ui/registry.json b/registry/remocn-ui/registry.json
index c6f8132d..1dbdebd3 100644
--- a/registry/remocn-ui/registry.json
+++ b/registry/remocn-ui/registry.json
@@ -693,7 +693,7 @@
"title": "UI Signup Flow",
"description": "A signup card composition: a real shadcn-style card (header, labeled Full Name / Email / Password / Confirm fields, primary + Google-outline buttons, sign-in footer) whose cursor fills each field top-to-bottom, then clicks Create account (hover → press → loading → success) as a success toast slides in. A pure orchestrator — every channel comes from a composed primitive's transition hook.",
"dependencies": ["remotion"],
- "registryDependencies": ["remocn-ui", "cursor", "input", "button", "toast", "field"],
+ "registryDependencies": ["remocn-ui", "cursor", "input", "button", "toast", "field", "blur-in"],
"files": [
{
"path": "signup-flow/index.tsx",
diff --git a/registry/remocn-ui/signup-flow/index.tsx b/registry/remocn-ui/signup-flow/index.tsx
index 73261fbf..b2609eb2 100644
--- a/registry/remocn-ui/signup-flow/index.tsx
+++ b/registry/remocn-ui/signup-flow/index.tsx
@@ -9,6 +9,8 @@ import { Button } from "@/components/remocn/button";
import { useButtonTransition } from "@/components/remocn/use-button-transition";
import { Toast } from "@/components/remocn/toast";
import { useToastTransition } from "@/components/remocn/use-toast-transition";
+import { BlurIn } from "@/components/remocn/blur-in";
+import { useBlurInTransition } from "@/components/remocn/use-blur-in-transition";
import {
Field,
FieldControl,
@@ -46,17 +48,6 @@ const CARD_TOP = 48;
const CARD_LEFT = (STAGE_W - CARD_W) / 2; // 452
const CENTER_X = STAGE_W / 2; // 640 — the centered content column
-// Cursor tip targets — each control's vertical center, derived from the flow:
-// card top 48 + pad 28 → content y 76. Header = title(28) + gap4 + desc(40, the
-// description wraps to 2 lines in the 320px column) = 72 → ends 148. gap24 →
-// FieldGroup at 172 (Field = label 18 + gap6 + control 40; group gap 16):
-// Name control 196–236 → center 216
-// Email control 276–316 → center 296 (+ desc 16)
-// Pass control 378–418 → center 398 (+ desc 16)
-// Confirm control 480–520 → center 500
-// gap24 → action Field at 544: Create control 544–584 → center 564.
-// (The click only needs to land on the field; focus is frame-driven, so a few
-// px of font drift is harmless.)
const NAME_Y = 216;
const EMAIL_Y = 296;
const PASS_Y = 398;
@@ -77,73 +68,87 @@ export function SignupFlow({
const resolved = useRemocnTheme(theme, mode);
const opts = { mode, theme };
- // Cursor: park → Name (18) → Email (52) → Password (96) → Confirm (134) →
- // Create (176). Each click `at` matches the target field's `active`/`hover`.
+ const cardEnter = useBlurInTransition(
+ [{ at: 0, state: "revealed", duration: 18 }],
+ { distance: 0 },
+ );
+ const enterHeader = useBlurInTransition([
+ { at: 18, state: "revealed", duration: 16 },
+ ]);
+ const enterName = useBlurInTransition([
+ { at: 24, state: "revealed", duration: 16 },
+ ]);
+ const enterEmail = useBlurInTransition([
+ { at: 30, state: "revealed", duration: 16 },
+ ]);
+ const enterPass = useBlurInTransition([
+ { at: 36, state: "revealed", duration: 16 },
+ ]);
+ const enterConfirm = useBlurInTransition([
+ { at: 42, state: "revealed", duration: 16 },
+ ]);
+ const enterButton = useBlurInTransition([
+ { at: 48, state: "revealed", duration: 16 },
+ ]);
+
+ const DEMO = 48;
+
const cursorStyle = useCursorPath([
{ at: 0, x: 160, y: 120 },
- { at: 18, x: CENTER_X, y: NAME_Y, duration: 18, click: true },
- { at: 52, x: CENTER_X, y: EMAIL_Y, duration: 30, click: true },
- { at: 96, x: CENTER_X, y: PASS_Y, duration: 40, click: true },
- { at: 134, x: CENTER_X, y: CONFIRM_Y, duration: 32, click: true },
- { at: 176, x: CENTER_X, y: CREATE_Y, duration: 38, click: true },
+ { at: 18 + DEMO, x: CENTER_X, y: NAME_Y, duration: 18, click: true },
+ { at: 52 + DEMO, x: CENTER_X, y: EMAIL_Y, duration: 30, click: true },
+ { at: 96 + DEMO, x: CENTER_X, y: PASS_Y, duration: 40, click: true },
+ { at: 134 + DEMO, x: CENTER_X, y: CONFIRM_Y, duration: 32, click: true },
+ { at: 176 + DEMO, x: CENTER_X, y: CREATE_Y, duration: 38, click: true },
]);
- // Each field focuses on its click, then reveals its typed value. Each field's
- // own hook holds the filled visual afterward.
- // Each field focuses on its click, types its value, then BLURS (state `blur`)
- // the moment the cursor clicks the next field/button — so only the focused
- // field ever shows the ring + caret. `blur` keeps the value fully shown and
- // static (no un-typing); the previously-typed fields stay filled.
const nameStyle = useInputTransition(
[
- { at: 18, state: "active", duration: 6 },
- { at: 20, state: "typing", duration: 20 },
- { at: 52, state: "blur", duration: 8 },
+ { at: 18 + DEMO, state: "active", duration: 6 },
+ { at: 20 + DEMO, state: "typing", duration: 20 },
+ { at: 52 + DEMO, state: "blur", duration: 8 },
],
opts,
);
const emailStyle = useInputTransition(
[
- { at: 52, state: "active", duration: 6 },
- { at: 54, state: "typing", duration: 28 },
- { at: 96, state: "blur", duration: 8 },
+ { at: 52 + DEMO, state: "active", duration: 6 },
+ { at: 54 + DEMO, state: "typing", duration: 28 },
+ { at: 96 + DEMO, state: "blur", duration: 8 },
],
opts,
);
const passStyle = useInputTransition(
[
- { at: 96, state: "active", duration: 6 },
- { at: 98, state: "typing", duration: 22 },
- { at: 134, state: "blur", duration: 8 },
+ { at: 96 + DEMO, state: "active", duration: 6 },
+ { at: 98 + DEMO, state: "typing", duration: 22 },
+ { at: 134 + DEMO, state: "blur", duration: 8 },
],
opts,
);
const confirmStyle = useInputTransition(
[
- { at: 134, state: "active", duration: 6 },
- { at: 136, state: "typing", duration: 22 },
- { at: 176, state: "blur", duration: 8 },
+ { at: 134 + DEMO, state: "active", duration: 6 },
+ { at: 136 + DEMO, state: "typing", duration: 22 },
+ { at: 176 + DEMO, state: "blur", duration: 8 },
],
opts,
);
- // Create button: hover on arrival (176) → press → loading spinner → success.
const buttonStyle = useButtonTransition(
[
- { at: 176, state: "hover", duration: 8 },
- { at: 186, state: "press", duration: 6 },
- { at: 192, state: "loading", duration: 6 },
- { at: 234, state: "success", duration: 16 },
+ { at: 176 + DEMO, state: "hover", duration: 8 },
+ { at: 186 + DEMO, state: "press", duration: 6 },
+ { at: 192 + DEMO, state: "loading", duration: 6 },
+ { at: 234 + DEMO, state: "success", duration: 16 },
],
opts,
);
- // Toast: enters with success (234), auto-dismisses at 300. (No `theme` option
- // — the Toast component resolves the theme for its own surface.)
const toastStyle = useToastTransition(
[
- { at: 234, state: "visible", duration: 14 },
- { at: 300, state: "hidden", duration: 14 },
+ { at: 234 + DEMO, state: "visible", duration: 14 },
+ { at: 300 + DEMO, state: "hidden", duration: 14 },
],
{ mode },
);
@@ -159,8 +164,6 @@ export function SignupFlow({
"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
}}
>
- {/* Card — surface = theme.background so the atoms' fills blend in. The
- content flows in a padded column. */}
<div
style={{
position: "absolute",
@@ -178,115 +181,125 @@ export function SignupFlow({
borderRadius: 14,
boxShadow:
"0 10px 30px -12px rgba(0,0,0,0.22), 0 2px 8px -3px rgba(0,0,0,0.10)",
+ opacity: cardEnter.opacity,
+ filter: cardEnter.blur > 0 ? `blur(${cardEnter.blur}px)` : "none",
}}
>
- {/* Header. */}
- <div style={{ display: "flex", flexDirection: "column", gap: 4 }}>
- <div
- style={{
- fontSize: 22,
- lineHeight: "28px",
- fontWeight: 600,
- letterSpacing: "-0.02em",
- color: resolved.cardForeground,
- }}
- >
- {title}
- </div>
- <div
- style={{
- fontSize: 14,
- lineHeight: "20px",
- color: resolved.mutedForeground,
- }}
- >
- {description}
+ <BlurIn display="block" style={enterHeader}>
+ <div style={{ display: "flex", flexDirection: "column", gap: 4 }}>
+ <div
+ style={{
+ fontSize: 22,
+ lineHeight: "28px",
+ fontWeight: 600,
+ letterSpacing: "-0.02em",
+ color: resolved.cardForeground,
+ }}
+ >
+ {title}
+ </div>
+ <div
+ style={{
+ fontSize: 14,
+ lineHeight: "20px",
+ color: resolved.mutedForeground,
+ }}
+ >
+ {description}
+ </div>
</div>
- </div>
+ </BlurIn>
- {/* Fields. */}
<FieldGroup gap={16}>
- <Field>
- <FieldLabel mode={mode} theme={theme}>
- Full Name
- </FieldLabel>
- <FieldControl>
- <Input
- placeholder={fullName}
- value={fullName}
- style={nameStyle}
- mode={mode}
- theme={theme}
- />
- </FieldControl>
- </Field>
+ <BlurIn display="block" style={enterName}>
+ <Field>
+ <FieldLabel mode={mode} theme={theme}>
+ Full Name
+ </FieldLabel>
+ <FieldControl>
+ <Input
+ placeholder={fullName}
+ value={fullName}
+ style={nameStyle}
+ mode={mode}
+ theme={theme}
+ />
+ </FieldControl>
+ </Field>
+ </BlurIn>
- <Field>
- <FieldLabel mode={mode} theme={theme}>
- Email
- </FieldLabel>
- <FieldControl>
- <Input
- placeholder={email}
- value={email}
- style={emailStyle}
- mode={mode}
- theme={theme}
- />
- </FieldControl>
- <FieldDescription mode={mode} theme={theme}>
- We'll use this to contact you.
- </FieldDescription>
- </Field>
+ <BlurIn display="block" style={enterEmail}>
+ <Field>
+ <FieldLabel mode={mode} theme={theme}>
+ Email
+ </FieldLabel>
+ <FieldControl>
+ <Input
+ placeholder={email}
+ value={email}
+ style={emailStyle}
+ mode={mode}
+ theme={theme}
+ />
+ </FieldControl>
+ <FieldDescription mode={mode} theme={theme}>
+ We'll use this to contact you.
+ </FieldDescription>
+ </Field>
+ </BlurIn>
- <Field>
- <FieldLabel mode={mode} theme={theme}>
- Password
- </FieldLabel>
- <FieldControl>
- <Input
- placeholder={password}
- value={password}
- style={passStyle}
- mode={mode}
- theme={theme}
- />
- </FieldControl>
- <FieldDescription mode={mode} theme={theme}>
- Must be at least 8 characters long.
- </FieldDescription>
- </Field>
+ <BlurIn display="block" style={enterPass}>
+ <Field>
+ <FieldLabel mode={mode} theme={theme}>
+ Password
+ </FieldLabel>
+ <FieldControl>
+ <Input
+ placeholder={password}
+ value={password}
+ style={passStyle}
+ mode={mode}
+ theme={theme}
+ />
+ </FieldControl>
+ <FieldDescription mode={mode} theme={theme}>
+ Must be at least 8 characters long.
+ </FieldDescription>
+ </Field>
+ </BlurIn>
- <Field>
- <FieldLabel mode={mode} theme={theme}>
- Confirm Password
- </FieldLabel>
+ <BlurIn display="block" style={enterConfirm}>
+ <Field>
+ <FieldLabel mode={mode} theme={theme}>
+ Confirm Password
+ </FieldLabel>
+ <FieldControl>
+ <Input
+ placeholder={password}
+ value={password}
+ style={confirmStyle}
+ mode={mode}
+ theme={theme}
+ />
+ </FieldControl>
+ </Field>
+ </BlurIn>
+ </FieldGroup>
+
+ <BlurIn display="block" style={enterButton}>
+ <Field gap={10}>
<FieldControl>
- <Input
- placeholder={password}
- value={password}
- style={confirmStyle}
+ <Button
+ label={createLabel}
+ style={buttonStyle}
mode={mode}
theme={theme}
/>
</FieldControl>
</Field>
- </FieldGroup>
-
- {/* Actions + footer. */}
- <Field gap={10}>
- <FieldControl>
- <Button
- label={createLabel}
- style={buttonStyle}
- mode={mode}
- theme={theme}
- />
- </FieldControl>
- </Field>
+ </BlurIn>
</div>
- {/* Success toast, anchored bottom-right of the stage. */}
<div style={{ position: "absolute", right: 32, bottom: 32 }}>
<Toast
title={toastTitle}