Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: added settings card block
dev_wandryfe5472c89ef1
diff --git a/components/docs/examples/blocks/index.tsx b/components/docs/examples/blocks/index.tsxindex fcd64c97..b78ca13d 100644--- a/components/docs/examples/blocks/index.tsx+++ b/components/docs/examples/blocks/index.tsx@@ -70,8 +70,9 @@ export const blockExamples: Record<string, BlockExampleEntry> = {"checkout-flow": {Component: CheckoutFlowExampleScene,code: checkoutFlowExampleCode,- // Final beat 235 + ~10 settle (US-B003).- durationInFrames: 245,+ // blur-in entrance (card → header → toggle → fields → Pay, ~0–58) → cursor+ // demo (toggle 64 → card 96 → terms 150 → Pay 180) → toast dismiss 286 + ~34.+ durationInFrames: 320,fps: FPS,width: W,height: H,@@ -88,8 +89,10 @@ export const blockExamples: Record<string, BlockExampleEntry> = {"settings-toggle-flow": {Component: SettingsToggleFlowExampleScene,code: settingsToggleFlowExampleCode,- // Final beat 215 + ~10 settle (US-B005).- durationInFrames: 225,+ // blur-in entrance (card → header → controls, ~0–58) → cursor demo (+DEMO+ // 44): switch 68 → select 99/124 → slider 149–202 → Save click 224 → toast+ // 240–300 dismiss + ~20 settle.+ durationInFrames: 320,fps: FPS,width: W,height: H,diff --git a/components/docs/examples/checkout-flow-example.tsx b/components/docs/examples/checkout-flow-example.tsxindex ae706806..c1bfadff 100644--- a/components/docs/examples/checkout-flow-example.tsx+++ b/components/docs/examples/checkout-flow-example.tsx@@ -3,16 +3,17 @@import { CheckoutFlow } from "@/registry/remocn-ui/checkout-flow";/**- * Fixed lifecycle demo for the `checkout-flow` block: a cursor flips the billing- * toggle monthly → yearly, clicks Upgrade, a payment Dialog opens, the card- * number types in, the confirm button runs press → loading → success, the Dialog- * closes and a success Toast slides in. The block is a pure orchestrator — every- * channel comes from a composed primitive's hook.+ * Fixed lifecycle demo for the `checkout-flow` block: the card and its fields+ * blur-in (card → header → toggle → card number → terms → Pay), then a cursor+ * flips the billing toggle monthly → yearly, types the card number, ticks the+ * terms checkbox, and presses Pay → loading → success, ending in a success+ * Toast. The block is a pure orchestrator — every channel comes from a composed+ * primitive's hook.*- * Timeline (US-B003 beat table): toggle click 24 ≡ toggle slide 24; Upgrade- * click 50 ≡ button press 50; dialog open 56; card typing 70→120; confirm press- * 124 → loading 128 → success 165; dialog close 175; toast enter 178 → dismiss- * 235. durationInFrames 245 (235 + ~10 settle).+ * Timeline: entrance 0→58; toggle click 64 ≡ toggle slide 64; card field click+ * 96 → typing 100→140; terms click 150 ≡ checkbox checked 150; Pay click 180 →+ * loading 186 → success 224; toast enter 224 → dismiss 286. durationInFrames+ * 320 (286 + 14 dismiss + ~20 settle).*/export const CheckoutFlowExampleScene = () => <CheckoutFlow />;diff --git a/components/docs/examples/settings-toggle-flow-example.tsx b/components/docs/examples/settings-toggle-flow-example.tsxindex df315e78..dc98b925 100644--- a/components/docs/examples/settings-toggle-flow-example.tsx+++ b/components/docs/examples/settings-toggle-flow-example.tsx@@ -2,17 +2,6 @@import { SettingsToggleFlow } from "@/registry/remocn-ui/settings-toggle-flow";-/**- * Fixed lifecycle demo for the `settings-toggle-flow` block: a cursor walks a- * settings panel — flipping a Switch, opening a Select and choosing an option,- * then dragging a Slider — ending on a "Settings saved" Toast. The block is a- * pure orchestrator; every channel comes from a composed primitive's hook.- *- * Timeline (US-B005 beat table): switch click 24 ≡ switch on 24; select click 55- * ≡ panel open 55; item click 80 ≡ select 80; panel close 90; slider drag- * 105→150 (dual-channel value + thumb); toast enter 155 → dismiss 215.- * durationInFrames 225 (215 + ~10 settle).- */export const SettingsToggleFlowExampleScene = () => <SettingsToggleFlow />;export const settingsToggleFlowExampleCode = (): string => {diff --git a/content/docs/ui/blocks/ai-prompt-flow.mdx b/content/docs/ui/blocks/ai-prompt-flow.mdxdeleted file mode 100644index f0e76aae..00000000--- a/content/docs/ui/blocks/ai-prompt-flow.mdx+++ /dev/null@@ -1,74 +0,0 @@-----title: AiPromptFlow-description: AI prompt submission with skeleton loading shimmer and response reveal crossfade------<BlockPreview name="ai-prompt-flow" />--A composition scene showing the AI request lifecycle: prompt typing, submit, skeleton shimmer, response reveal, and completion toast. The skeleton block's shimmer motion and the crossfade between loading and loaded states demonstrate composition of motion atoms without new motion math.--## Installation--<InstallBlock name="ai-prompt-flow" />--<Note>-Installing `ai-prompt-flow` automatically installs the shared `remocn-ui` core and all composed primitives via `registryDependencies`: input, button, skeleton, skeleton-block, and toast. You do not need to install them separately.-</Note>--## Composed primitives--- **Input** — text reveal for the prompt-- **Button** — hover/press/loading state progression-- **Skeleton** — loading state with shimmer animation-- **Skeleton-block** — motion atom shimmer sweep (loopable)-- **Toast** — completion message auto-dismiss--## Timeline narrative--The input begins revealing the prompt text from frame 0 to frame 50. At frame 52, the cursor moves to the button trigger, entering hover state. Frame 58 brings a press, transitioning to loading at frame 62. Simultaneously, the skeleton enters loading state and skeleton-block begins its shimmer sweep, looping from frame 64 to frame 150. At frame 150, the skeleton state changes to loaded, crossfading from the shimmer to the response text with opacities summing to 1 (no layout shift). The toast appears at frame 160 to confirm the response is ready and auto-dismisses at frame 220.--## Props--<PropsTable- rows={[- {- name: "prompt",- type: "string",- default: "\"Summarize this thread\"",- description: "Prompt text to be revealed during input animation.",- },- {- name: "buttonLabel",- type: "string",- default: "\"Generate\"",- description: "Text displayed on the submit button.",- },- {- name: "answer",- type: "string",- description: "Response text shown after loading completes.",- },- {- name: "answerLines",- type: "string[]",- description: "Response as array of lines (alternative to answer).",- },- {- name: "toastTitle",- type: "string",- default: "\"Response ready\"",- description: "Success message shown in the toast.",- },- {- name: "mode",- type: "\"light\" | \"dark\"",- default: "\"light\"",- description: "Color mode applied to all composed primitives.",- },- {- name: "theme",- type: "RemocnTheme",- description: "Optional theme override (concrete oklch/hex/rgb values).",- },- ]}-/>diff --git a/content/docs/ui/blocks/checkout-flow.mdx b/content/docs/ui/blocks/checkout-flow.mdxindex e2c862a6..103aab42 100644--- a/content/docs/ui/blocks/checkout-flow.mdx+++ b/content/docs/ui/blocks/checkout-flow.mdx@@ -1,60 +1,80 @@---title: CheckoutFlow-description: Pricing toggle, cursor-driven checkout dialog with card input and payment confirmation+description: A cursor-driven checkout card with a pricing toggle, card input, terms checkbox, and payment confirmation---<BlockPreview name="checkout-flow" />-A composition scene demonstrating a complete checkout flow: toggle between pricing plans, cursor-driven upgrade button, modal dialog with card entry, payment processing, and success confirmation. Shows dialog open/close animations and input reveal within a modal context.+A composition scene rendered as a real checkout card. The card and its fields blur-in in sequence, then a cursor flips the billing toggle monthly → yearly, types the card number, ticks the terms checkbox, and presses Pay through loading to success — finishing with a success toast. A pure orchestrator: every animated channel comes from a composed primitive's transition hook.## Installation<InstallBlock name="checkout-flow" /><Note>-Installing `checkout-flow` automatically installs the shared `remocn-ui` core and all composed primitives via `registryDependencies`: toggle-group, dialog, input, button, cursor, and toast. You do not need to install them separately.+Installing `checkout-flow` automatically installs the shared `remocn-ui` core and all composed primitives via `registryDependencies`: toggle-group, input, checkbox, button, field, blur-in, cursor, and toast. You do not need to install them separately.</Note>## Composed primitives+- **Blur-in** — staggered reveal of the card, header, and each field- **Toggle-group** — segmented control for plan selection-- **Dialog** — modal backdrop and zoom animation-- **Input** — card number reveal animation-- **Button** — primary action with hover/press/loading/success states+- **Input** — card number reveal, then a static filled (blur) resting state+- **Checkbox** — terms acceptance with a draw-on checkmark+- **Button** — primary Pay action with hover/press/loading/success states+- **Field** — labeled layout slots for the controls- **Cursor** — animated pointer with click ripples- **Toast** — payment confirmation message## Timeline narrative-The scene opens with the toggle-group showing monthly/yearly options. At frame 24, the cursor clicks the yearly segment, and the toggle animates to yearly (thumb slides to the new position). At frame 50, the cursor moves to the upgrade button and clicks, triggering hover then press states. The dialog opens at frame 56 with backdrop dim and zoom. The input inside the dialog begins revealing the card number from frame 70 to frame 120. At frame 124, the confirm button is pressed, transitioning to loading at frame 128. By frame 165, the button reaches success state (checkmark). The dialog closes at frame 175, and the success toast appears at frame 178, auto-dismissing at frame 235.+The card surface fades in place (frames 0–18), then the header and each field blur-in staggered, all settling by frame 58. At frame 64 the cursor clicks the Yearly segment and the toggle thumb slides to it. At frame 96 the cursor focuses the card-number field, which types in from frame 100 to 140, then settles to its static filled state as the cursor leaves at 150 — the same frame the terms checkbox is clicked and ticks. At frame 180 the cursor presses Pay: hover → press → loading (186) → success (224). The success toast slides in at frame 224 and auto-dismisses at frame 286.## Props<PropsTablerows={[+ {+ name: "title",+ type: "string",+ default: "\"Upgrade your plan\"",+ description: "Card title shown in the header.",+ },+ {+ name: "description",+ type: "string",+ default: "\"Complete your purchase to unlock every feature.\"",+ description: "Supporting line under the title.",+ },{name: "plans",type: "{value: string; label: string}[]",default: "[{value:\"monthly\",label:\"Monthly\"},{value:\"yearly\",label:\"Yearly\"}]",- description: "Array of pricing plan options for the toggle-group.",+ description: "Array of pricing plan options for the toggle-group. The first is the resting selection.",},{- name: "upgradeLabel",+ name: "cardLabel",type: "string",- default: "\"Upgrade\"",- description: "Text displayed on the upgrade button.",+ default: "\"Card number\"",+ description: "Label rendered above the card-number input.",},{name: "cardPlaceholder",type: "string",default: "\"4242 4242 4242 4242\"",- description: "Card number placeholder shown in the input.",+ description: "Card number value revealed by the typing input.",+ },+ {+ name: "termsLabel",+ type: "string",+ default: "\"I accept the terms and conditions\"",+ description: "Text shown beside the terms checkbox.",},{- name: "confirmLabel",+ name: "payLabel",type: "string",- default: "\"Pay\"",- description: "Text displayed on the confirm button inside the dialog.",+ default: "\"Pay $49\"",+ description: "Text displayed on the primary Pay button.",},{name: "toastTitle",diff --git a/content/docs/ui/blocks/index.mdx b/content/docs/ui/blocks/index.mdxindex d839d666..e3fdd98d 100644--- a/content/docs/ui/blocks/index.mdx+++ b/content/docs/ui/blocks/index.mdx@@ -13,24 +13,12 @@ Complete, shippable video compositions built from remocn-ui primitives. Each blostatus: "stable",href: "/docs/ui/blocks/signup-flow",},- {- name: "AiPromptFlow",- description: "AI prompt submission with skeleton loading and response reveal",- status: "stable",- href: "/docs/ui/blocks/ai-prompt-flow",- },{name: "CheckoutFlow",description: "Pricing toggle, checkout dialog, and payment confirmation",status: "stable",href: "/docs/ui/blocks/checkout-flow",},- {- name: "OnboardingStepperFlow",- description: "Multi-step onboarding with form inputs and panel crossfade",- status: "stable",- href: "/docs/ui/blocks/onboarding-stepper-flow",- },{name: "SettingsToggleFlow",description: "Settings panel with toggle, select, and slider controls",diff --git a/content/docs/ui/blocks/meta.json b/content/docs/ui/blocks/meta.jsonindex 947604f1..30f068c2 100644--- a/content/docs/ui/blocks/meta.json+++ b/content/docs/ui/blocks/meta.json@@ -1,5 +1,5 @@{"title": "Blocks","collapsible": false,- "pages": ["index", "signup-flow", "ai-prompt-flow", "checkout-flow", "onboarding-stepper-flow", "settings-toggle-flow"]+ "pages": ["index", "signup-flow", "checkout-flow", "settings-toggle-flow"]}diff --git a/content/docs/ui/blocks/onboarding-stepper-flow.mdx b/content/docs/ui/blocks/onboarding-stepper-flow.mdxdeleted file mode 100644index 4ac88a06..00000000--- a/content/docs/ui/blocks/onboarding-stepper-flow.mdx+++ /dev/null@@ -1,76 +0,0 @@-----title: OnboardingStepperFlow-description: Multi-step onboarding with form inputs and panel crossfade driven by stepper position------<BlockPreview name="onboarding-stepper-flow" />--A composition scene showing a three-step onboarding flow: account setup, plan selection, and settings configuration. Demonstrates the sanctioned panel-crossfade pattern where step visibility is derived linearly from the stepper's exposed position channel, with no additional motion math.--## Installation--<InstallBlock name="onboarding-stepper-flow" />--<Note>-Installing `onboarding-stepper-flow` automatically installs the shared `remocn-ui` core and all composed primitives via `registryDependencies`: stepper, input, radio, switch, and button. You do not need to install them separately.-</Note>--## Composed primitives--- **Stepper** — multi-step indicator with completed-step checkmarks-- **Input** — text reveal for account name-- **Radio** — plan selection control-- **Switch** — toggle for settings option-- **Button** — next/finish navigation actions--## Timeline narrative--The stepper and step-1 input are both visible at frame 0, with the input beginning to reveal the account name from frame 10 to frame 55. At frame 60, the Next button is pressed, triggering the stepper to advance from position 0 to position 1 from frames 64–90. The panel crossfade is derived linearly from `StepperStyle.position` (opacity = clamp(linear(position))). The radio for plan selection becomes active during its step window (90–104). At frame 100, Next is pressed again, advancing position to 2, and the switch control appears in step 3. At frame 150, the Finish button is pressed and transitions to success, with the stepper simultaneously completing and drawing checkmarks on all passed steps.--## Props--<PropsTable- rows={[- {- name: "steps",- type: "string[]",- default: "[\"Account\",\"Plan\",\"Settings\"]",- description: "Array of step titles displayed in the stepper.",- },- {- name: "name",- type: "string",- default: "\"[email protected]\"",- description: "Account name/email to be revealed in step 1 input.",- },- {- name: "plans",- type: "string[]",- default: "[\"Free\",\"Pro\",\"Team\"]",- description: "Array of plan options for step 2 radio selection.",- },- {- name: "nextLabel",- type: "string",- default: "\"Next\"",- description: "Text displayed on the next-step button.",- },- {- name: "finishLabel",- type: "string",- default: "\"Finish\"",- description: "Text displayed on the finish button (step 3).",- },- {- name: "mode",- type: "\"light\" | \"dark\"",- default: "\"light\"",- description: "Color mode applied to all composed primitives.",- },- {- name: "theme",- type: "RemocnTheme",- description: "Optional theme override (concrete oklch/hex/rgb values).",- },- ]}-/>diff --git a/content/docs/ui/blocks/settings-toggle-flow.mdx b/content/docs/ui/blocks/settings-toggle-flow.mdxindex 7d2e0ab3..0fe251e9 100644--- a/content/docs/ui/blocks/settings-toggle-flow.mdx+++ b/content/docs/ui/blocks/settings-toggle-flow.mdx@@ -1,41 +1,55 @@---title: SettingsToggleFlow-description: Settings panel with cursor-driven switch, select dropdown, and slider controls+description: Two-column settings card with a blur-in entrance and a cursor-driven switch, select, slider, and save---<BlockPreview name="settings-toggle-flow" />-A composition scene demonstrating a settings panel workflow: cursor navigates through a switch toggle, opens a select dropdown to choose a theme, and drags a slider to adjust volume. Concludes with a settings-saved confirmation toast. Shows cursor-driven interactions across multiple interactive primitives in sequence.+A composition scene laid out as a centered two-column settings card: a descriptive text block on the left, the controls stacked on the right — each under its own label, including a "Volume" label for the slider. The card and its controls blur-in in sequence, then a cursor flips the notifications switch, opens the theme select and picks an option, drags the volume slider, and clicks the bottom-right Save button — concluding with a settings-saved confirmation toast. Shows cursor-driven interactions across multiple interactive primitives in sequence.## Installation<InstallBlock name="settings-toggle-flow" /><Note>-Installing `settings-toggle-flow` automatically installs the shared `remocn-ui` core and all composed primitives via `registryDependencies`: switch, select, slider, cursor, and toast. Select automatically includes button and select-item via its own registryDependencies. You do not need to install them separately.+Installing `settings-toggle-flow` automatically installs the shared `remocn-ui` core and all composed primitives via `registryDependencies`: switch, select, slider, button, blur-in, cursor, and toast. Select also pulls in select-item via its own registryDependencies. You do not need to install them separately.</Note>## Composed primitives+- **Blur-in** — staggered reveal of the card, header, and each control group- **Switch** — toggle for notification settings- **Select** — dropdown control for theme selection (includes button + select-item)- **Slider** — dual-channel drag control (value + thumb state)+- **Button** — bottom-right Save action with hover/press/success states- **Cursor** — animated pointer with click and press interactions- **Toast** — settings-saved confirmation message## Timeline narrative-The cursor begins parked and moves to the first switch control at frame 24, clicking to toggle from off to on. At frame 55, the cursor arrives at the select dropdown trigger and clicks, opening the panel. At frame 80, the cursor moves to the theme option and clicks to select it, closing the dropdown at frame 90. The cursor then moves to the slider at frame 105 and begins dragging, maintaining pressed state while the slider value animates through its range from frame 105 to frame 150. At frame 155, the settings-saved toast appears, confirming the changes, and auto-dismisses at frame 215.+The card surface fades in place (frames 0–18), then the header and each control group blur-in staggered, all settling by frame 58. The cursor moves to the notifications switch and clicks to toggle it on (frame 68). It arrives at the theme select trigger and clicks to open the panel (99), moves to the last option and clicks to select it (124), closing the dropdown. It then drags the volume slider — holding the pressed state while the value animates from frame 149 to 194. After releasing, the cursor moves to the bottom-right Save button and clicks (224; press → success check). The settings-saved toast then appears at frame 240 and auto-dismisses at frame 300.## Props<PropsTablerows={[+ {+ name: "title",+ type: "string",+ default: "\"Notification settings\"",+ description: "Section title shown in the left text column.",+ },+ {+ name: "description",+ type: "string",+ default: "\"Manage how you receive alerts, set your theme, and tune the volume.\"",+ description: "Supporting paragraph under the title.",+ },{name: "rows",type: "{label: string}[]",default: "[{label:\"Notifications\"},{label:\"Theme\"},{label:\"Volume\"}]",- description: "Array of setting row labels with their associated controls.",+ description: "Setting row labels: [0] switch, [1] select, [2] slider.",},{name: "selectItems",@@ -43,6 +57,12 @@ The cursor begins parked and moves to the first switch control at frame 24, clicdefault: "[\"System\",\"Light\",\"Dark\"]",description: "Array of theme options for the select dropdown.",},+ {+ name: "saveLabel",+ type: "string",+ default: "\"Save settings\"",+ description: "Label of the bottom-right save button.",+ },{name: "toastTitle",type: "string",diff --git a/registry/remocn-ui/button/index.tsx b/registry/remocn-ui/button/index.tsxindex 38578fee..6ea70d52 100644--- a/registry/remocn-ui/button/index.tsx+++ b/registry/remocn-ui/button/index.tsx@@ -31,9 +31,20 @@ export interface ButtonProps {mode?: "light" | "dark";/** Playhead scale, forwarded to the loading Spinner. */speed?: number;+ /** Horizontal placement of the button within its (full-width) slot. */+ align?: "start" | "center" | "end";className?: string;}+/** Map an `align` value to a flexbox `justifyContent`. */+function justify(align: "start" | "center" | "end"): string {+ return align === "start"+ ? "flex-start"+ : align === "end"+ ? "flex-end"+ : "center";+}+/** Checkmark stroke length (svg path units). */const CHECK_PATH_LENGTH = 14;@@ -208,6 +219,7 @@ export function Button({primary,mode,speed = 1,+ align = "center",className,}: ButtonProps) {const theme = useRemocnTheme(@@ -229,7 +241,7 @@ export function Button({inset: 0,display: "flex",alignItems: "center",- justifyContent: "center",+ justifyContent: justify(align),background: theme.background,fontFamily:"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",diff --git a/registry/remocn-ui/checkbox/index.tsx b/registry/remocn-ui/checkbox/index.tsxindex 924b43b6..72e61848 100644--- a/registry/remocn-ui/checkbox/index.tsx+++ b/registry/remocn-ui/checkbox/index.tsx@@ -21,9 +21,20 @@ export interface CheckboxProps {/** Convenience override for the `primary` theme token — merged into `theme`. */primary?: string;mode?: "light" | "dark";+ /** Horizontal placement of the box+label within its slot. */+ align?: "start" | "center" | "end";className?: string;}+/** Map an `align` value to a flexbox `justifyContent`. */+function justify(align: "start" | "center" | "end"): string {+ return align === "start"+ ? "flex-start"+ : align === "end"+ ? "flex-end"+ : "center";+}+/** Checkmark stroke length (svg path units), drives the draw-on animation. */const CHECK_PATH_LENGTH = 14;@@ -116,6 +127,7 @@ export function Checkbox({theme: themeOverride,primary,mode,+ align = "center",className,}: CheckboxProps) {const theme = useRemocnTheme(@@ -135,7 +147,7 @@ export function Checkbox({inset: 0,display: "flex",alignItems: "center",- justifyContent: "center",+ justifyContent: justify(align),background: theme.background,fontFamily:"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",diff --git a/registry/remocn-ui/checkout-flow/index.tsx b/registry/remocn-ui/checkout-flow/index.tsxindex b8ca435a..246cfebc 100644--- a/registry/remocn-ui/checkout-flow/index.tsx+++ b/registry/remocn-ui/checkout-flow/index.tsx@@ -1,32 +1,43 @@"use client";-import { Button } from "@/components/remocn/button";-import { useButtonTransition } from "@/components/remocn/use-button-transition";+import { type RemocnTheme, useRemocnTheme } from "@/lib/remocn-ui";import { Cursor } from "@/components/remocn/cursor";import { useCursorPath } from "@/components/remocn/use-cursor-path";-import { Dialog } from "@/components/remocn/dialog";-import { useDialogTransition } from "@/components/remocn/use-dialog-transition";import { Input } from "@/components/remocn/input";import { useInputTransition } from "@/components/remocn/use-input-transition";-import { Toast } from "@/components/remocn/toast";-import { useToastTransition } from "@/components/remocn/use-toast-transition";+import { Button } from "@/components/remocn/button";+import { useButtonTransition } from "@/components/remocn/use-button-transition";+import { Checkbox } from "@/components/remocn/checkbox";+import { useCheckboxTransition } from "@/components/remocn/use-checkbox-transition";import {ToggleGroup,type ToggleGroupItem,} from "@/components/remocn/toggle-group";import { useToggleGroupTransition } from "@/components/remocn/use-toggle-group-transition";-import type { RemocnTheme } from "@/lib/remocn-ui";+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,+ FieldGroup,+ FieldLabel,+} from "@/components/remocn/field";/**- * Checkout flow — a shippable composition scene. Pure orchestrator: it scripts- * the lifecycle by calling each primitive's transition hook (which legitimately- * read the frame) and lays the primitives out on a position:relative stage. The- * block itself holds no state/effect/frame of its own (see §0B.2). Beat `at`- * values are the single source of truth (PRD US-B003) and are frame-synced so- * each cursor click lands on the same frame as the state change it triggers.+ * Checkout flow — a shippable composition scene rendered as a real card (no+ * Dialog). Pure orchestrator: it scripts the lifecycle by calling each+ * primitive's transition hook (which legitimately read the frame) and lays the+ * primitives out on a position:relative stage. The block holds no+ * state/effect/frame of its own.*- * Lifecycle: toggle monthly→yearly → cursor to Upgrade → Dialog opens → card- * number types in → confirm press → loading → success → Dialog closes → Toast.+ * The card itself, its header, and each field blur-in in sequence (card →+ * header → toggle → card number → terms → pay), then a cursor flips the billing+ * toggle monthly → yearly, types the card number, ticks the terms checkbox, and+ * presses Pay → loading → success → success Toast. Beat `at` values are the+ * single source of truth and are frame-synced so each cursor click lands on the+ * same frame as the state change it triggers.*/// Default plan segments for the billing toggle (value === label by default).@@ -35,23 +46,43 @@ const DEFAULT_PLANS: ToggleGroupItem[] = [{ value: "yearly", label: "Yearly" },];-// Stage geometry (1280×720). The toggle sits high, the Upgrade button mid-low;-// the cursor hotspot targets each in turn. Two-segment default toggle is 184px-// wide, centered → "Yearly" segment center X ≈ 684.-const TOGGLE_Y = 232;-const YEARLY_X = 684;-const UPGRADE_X = 640;-const UPGRADE_Y = 432;+// Stage geometry (1280×720). The card is centered; cursor Y targets are the+// vertical centers of each clickable control as they stack in the card column.+// Fields are left-aligned and the Pay button is right-aligned, so the X targets+// are anchored to the card's content edges, not its center.+const STAGE_W = 1280;+const CARD_W = 420;+const CARD_PAD = 28;+const CARD_TOP = 96;+const CARD_LEFT = (STAGE_W - CARD_W) / 2; // 430+const CENTER_X = STAGE_W / 2; // 640+const CONTENT_LEFT = CARD_LEFT + CARD_PAD; // 458+const CONTENT_RIGHT = CARD_LEFT + CARD_W - CARD_PAD; // 822++const TOGGLE_Y = 222;+const YEARLY_X = CONTENT_LEFT + 4 + 88 + 44; // 594 — "Yearly" segment center+const CARD_X = CENTER_X; // the input fills the row; click its middle+const CARD_Y = 312;+const TERMS_X = CONTENT_LEFT + 12; // 470 — over the left-aligned checkbox box+const TERMS_Y = 376;+const PAY_X = CONTENT_RIGHT - 48; // 774 — over the right-aligned Pay button+const PAY_Y = 442;export interface CheckoutFlowProps {+ /** Card title. */+ title?: string;+ /** Card description under the title. */+ description?: string;/** Billing toggle segments. The first is the resting selection. */plans?: ToggleGroupItem[];- /** Label of the button that opens the payment dialog. */- upgradeLabel?: string;- /** Card-number value revealed by the typing input inside the dialog. */+ /** Label above the card-number input. */+ cardLabel?: string;+ /** Card-number value revealed by the typing input. */cardPlaceholder?: string;- /** Label of the dialog's primary (confirm) action button. */- confirmLabel?: string;+ /** Label shown beside the terms checkbox. */+ termsLabel?: string;+ /** Primary (pay) button label. */+ payLabel?: string;/** Headline of the success toast. */toastTitle?: string;mode?: "light" | "dark";@@ -59,175 +90,220 @@ export interface CheckoutFlowProps {}export function CheckoutFlow({+ title = "Upgrade your plan",+ description = "Complete your purchase to unlock every feature.",plans = DEFAULT_PLANS,- upgradeLabel = "Upgrade",+ cardLabel = "Card number",cardPlaceholder = "4242 4242 4242 4242",- confirmLabel = "Pay",+ termsLabel = "I accept the terms and conditions",+ payLabel = "Pay $49",toastTitle = "Payment successful",mode = "light",theme,}: CheckoutFlowProps) {+ const resolved = useRemocnTheme(theme, mode);const opts = { mode, theme };- // Beat 1 — cursor clicks the "Yearly" segment at 24; then eases to Upgrade and- // clicks at 50 (beat 3). Click `at` == the driven state-change `at`.+ // Entrance — card surface fades in place (distance 0 → no slide, so it never+ // becomes a transform containing block for the inset:0 atoms it holds), then+ // the header and each field blur-in staggered. All complete by frame 58,+ // before the first cursor click at 64.+ const cardEnter = useBlurInTransition(+ [{ at: 0, state: "revealed", duration: 18 }],+ { distance: 0 },+ );+ const enterHeader = useBlurInTransition([+ { at: 18, state: "revealed", duration: 16 },+ ]);+ const enterToggle = useBlurInTransition([+ { at: 24, state: "revealed", duration: 16 },+ ]);+ const enterCard = useBlurInTransition([+ { at: 30, state: "revealed", duration: 16 },+ ]);+ const enterTerms = useBlurInTransition([+ { at: 36, state: "revealed", duration: 16 },+ ]);+ const enterButton = useBlurInTransition([+ { at: 42, state: "revealed", duration: 16 },+ ]);++ // Cursor — clicks the Yearly segment (64), the card-number field (96), the+ // terms checkbox (150), then the Pay button (180). Each click `at` equals the+ // `at` of the state change it drives.const cursorStyle = useCursorPath([- { at: 0, x: 96, y: 80 },- { at: 24, x: YEARLY_X, y: TOGGLE_Y, duration: 22 },- { at: 24, x: YEARLY_X, y: TOGGLE_Y, click: true, duration: 0 },- { at: 50, x: UPGRADE_X, y: UPGRADE_Y, duration: 22 },- { at: 50, x: UPGRADE_X, y: UPGRADE_Y, click: true, duration: 0 },+ { at: 0, x: 140, y: 90 },+ { at: 64, x: YEARLY_X, y: TOGGLE_Y, duration: 22, click: true },+ { at: 96, x: CARD_X, y: CARD_Y, duration: 24, click: true },+ { at: 150, x: TERMS_X, y: TERMS_Y, duration: 30, click: true },+ { at: 180, x: PAY_X, y: PAY_Y, duration: 26, click: true },]);- // Beat 2 — toggle slides monthly → yearly on the click at 24.+ // Billing toggle slides monthly → yearly on the click at 64.const toggleStyle = useToggleGroupTransition(- [{ at: 24, state: plans[1]?.value ?? "yearly", duration: 14 }],+ [{ at: 64, state: plans[1]?.value ?? "yearly", duration: 16 }],{ items: plans, ...opts },);- // Beat 4 — the Upgrade button hovers then presses into the click at 50.- const upgradeStyle = useButtonTransition(- [- { at: 40, state: "hover", duration: 10 },- { at: 50, state: "press", duration: 8 },- ],- opts,- );-- // Beat 5 / 10 — dialog opens at 56 (after the press), closes at 175.- const dialogStyle = useDialogTransition(+ // Card-number field — focus on the click at 96, type 100→140, then settle to+ // the static blur (filled/unfocused) state as the cursor leaves at 150.+ const cardStyle = useInputTransition([- { at: 56, state: "opened", duration: 14 },- { at: 175, state: "closed", duration: 12 },+ { at: 96, state: "active", duration: 6 },+ { at: 100, state: "typing", duration: 40 },+ { at: 150, state: "blur", duration: 8 },],opts,);- // Beat 6 — card number types in from 70 to 120 (inside the dialog). `at` is the- // transition START and the reveal ramps over [at, at+duration) (useStateTransition- // / STYLE-GUIDE §5), so the typing window is [70, 120] — fully revealed by 120,- // before the confirm press at 124 (PRD US-B003 beat 6 + AC4). A brief `active`- // focus precedes it as the dialog settles.- const cardStyle = useInputTransition(- [- { at: 62, state: "active", duration: 8 },- { at: 70, state: "typing", duration: 50 },- ],+ // Terms checkbox ticks on the click at 150.+ const checkboxStyle = useCheckboxTransition(+ [{ at: 150, state: "checked", duration: 14 }],opts,);- // Beats 7/8/9 — confirm press (124) → loading (128) → success (165).- const confirmStyle = useButtonTransition(+ // Pay button — hovers, presses into the click at 180, loads, then succeeds.+ const payStyle = useButtonTransition([- { at: 124, state: "press", duration: 6 },- { at: 128, state: "loading", duration: 6 },- { at: 165, state: "success", duration: 16 },+ { at: 172, state: "hover", duration: 8 },+ { at: 180, state: "press", duration: 6 },+ { at: 186, state: "loading", duration: 6 },+ { at: 224, state: "success", duration: 16 },],opts,);- // Beats 11/12 — success toast enters at 178, auto-dismisses at 235. The toast- // hook tints by `mode` only (no animated theme channel); `theme` rides the- // component prop below.+ // Success toast enters at 224, auto-dismisses at 286. The toast hook tints by+ // `mode` only; `theme` rides the component prop below.const toastStyle = useToastTransition([- { at: 178, state: "visible", duration: 12 },- { at: 235, state: "hidden", duration: 12 },+ { at: 224, state: "visible", duration: 14 },+ { at: 286, state: "hidden", duration: 14 },],{ mode },);return (- <div style={{ position: "relative", width: "100%", height: "100%" }}>- {/* Billing toggle — its own relative box scopes the primitive's inset:0. */}+ <div+ style={{+ position: "relative",+ width: "100%",+ height: "100%",+ background: resolved.muted,+ fontFamily:+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",+ }}+ ><divstyle={{position: "absolute",- left: 0,- right: 0,- top: TOGGLE_Y - 40,- height: 80,+ left: CARD_LEFT,+ top: CARD_TOP,+ width: CARD_W,+ height: 420,+ boxSizing: "border-box",+ padding: 28,+ display: "flex",+ flexDirection: "column",+ gap: 24,+ background: resolved.background,+ border: `1px solid ${resolved.border}`,+ 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",}}>- <ToggleGroup style={toggleStyle} items={plans} mode={mode} theme={theme} />- </div>+ <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>+ </BlurIn>- {/* Upgrade button. */}- <div- style={{- position: "absolute",- left: 0,- right: 0,- top: UPGRADE_Y - 40,- height: 80,- }}- >- <Button- label={upgradeLabel}- style={upgradeStyle}- mode={mode}- theme={theme}- />- </div>+ <BlurIn display="block" style={enterToggle}>+ <FieldControl height={44}>+ <ToggleGroup+ style={toggleStyle}+ items={plans}+ align="start"+ mode={mode}+ theme={theme}+ />+ </FieldControl>+ </BlurIn>- {/* Payment dialog — transparent overlay; the backdrop + card fade with it.- The card-number input and confirm button are layered over the card and- ride the dialog's own opacity (driven by the same hook). */}- <Dialog- style={dialogStyle}- title="Complete payment"- description="Enter your card details to finish upgrading."- actionLabel={confirmLabel}- cancelLabel="Cancel"- mode={mode}- theme={theme}- />-- {/* Card-number field, overlaid on the dialog body, fading with the popup. */}- <div- style={{- position: "absolute",- left: 0,- right: 0,- top: 332,- height: 64,- opacity: dialogStyle.popupOpacity,- }}- >- <Input- style={cardStyle}- placeholder={cardPlaceholder}- value={cardPlaceholder}- mode={mode}- theme={theme}- />- </div>+ <FieldGroup gap={24}>+ <BlurIn display="block" style={enterCard}>+ <Field>+ <FieldLabel mode={mode} theme={theme}>+ {cardLabel}+ </FieldLabel>+ <FieldControl>+ <Input+ placeholder={cardPlaceholder}+ value={cardPlaceholder}+ style={cardStyle}+ fullWidth+ mode={mode}+ theme={theme}+ />+ </FieldControl>+ </Field>+ </BlurIn>- {/* Confirm button, overlaid on the dialog footer, fading with the popup. */}- <div- style={{- position: "absolute",- left: 0,- right: 0,- top: 408,- height: 64,- opacity: dialogStyle.popupOpacity,- }}- >- <Button- label={confirmLabel}- style={confirmStyle}- mode={mode}- theme={theme}- />+ <BlurIn display="block" style={enterTerms}>+ <FieldControl>+ <Checkbox+ label={termsLabel}+ style={checkboxStyle}+ align="start"+ mode={mode}+ theme={theme}+ />+ </FieldControl>+ </BlurIn>+ </FieldGroup>++ <BlurIn display="block" style={enterButton}>+ <Field gap={10}>+ <FieldControl height={44}>+ <Button+ label={payLabel}+ style={payStyle}+ align="end"+ mode={mode}+ theme={theme}+ />+ </FieldControl>+ </Field>+ </BlurIn></div>- {/* Success toast, anchored bottom-right. */}- <div style={{ position: "absolute", right: 24, bottom: 24 }}>+ <div style={{ position: "absolute", right: 32, bottom: 32 }}><Toast- style={toastStyle}title={toastTitle}variant="success"+ style={toastStyle}mode={mode}theme={theme}/>diff --git a/registry/remocn-ui/input/index.tsx b/registry/remocn-ui/input/index.tsxindex 1a2e73cd..b975a19d 100644--- a/registry/remocn-ui/input/index.tsx+++ b/registry/remocn-ui/input/index.tsx@@ -29,10 +29,16 @@ export interface InputProps {/** Convenience override for the `primary` theme token — merged into `theme`. */primary?: string;mode?: "light" | "dark";+ /**+ * Stretch the field to fill its slot instead of the intrinsic `FIELD_WIDTH`.+ * Use inside a sized container (e.g. a card column) so the box is flush with+ * the surrounding labels and controls.+ */+ fullWidth?: boolean;className?: string;}-/** Field width (px) of the rendered input. */+/** Intrinsic field width (px) when not stretched to fill its slot. */const FIELD_WIDTH = 320;const SIZE_STYLES: Record<@@ -189,6 +195,7 @@ export function Input({theme: themeOverride,primary,mode,+ fullWidth = false,className,}: InputProps) {const theme = useRemocnTheme(@@ -223,7 +230,7 @@ export function Input({position: "relative",display: "flex",alignItems: "center",- width: FIELD_WIDTH,+ width: fullWidth ? "100%" : FIELD_WIDTH,height: sizeStyle.height,padding: `0 ${sizeStyle.padding}px`,fontSize: sizeStyle.fontSize,diff --git a/registry/remocn-ui/registry.json b/registry/remocn-ui/registry.jsonindex 1dbdebd3..c58c556c 100644--- a/registry/remocn-ui/registry.json+++ b/registry/remocn-ui/registry.json@@ -721,9 +721,9 @@"name": "checkout-flow","type": "registry:component","title": "UI Checkout Flow",- "description": "A cursor-driven checkout composition: a billing-cycle toggle, a card field, and a Pay button open into a confirmation dialog, ending in a success toast. A pure orchestrator — every channel comes from a composed primitive's transition hook.",+ "description": "A cursor-driven checkout card: the card and its fields blur-in, then the pointer flips a billing-cycle toggle, types a card number, ticks the terms checkbox, and presses Pay through to success, ending in a toast. A pure orchestrator — every channel comes from a composed primitive's transition hook.","dependencies": ["remotion"],- "registryDependencies": ["remocn-ui", "toggle-group", "dialog", "input", "button", "cursor", "toast"],+ "registryDependencies": ["remocn-ui", "toggle-group", "input", "checkbox", "button", "field", "blur-in", "cursor", "toast"],"files": [{"path": "checkout-flow/index.tsx",@@ -751,9 +751,9 @@"name": "settings-toggle-flow","type": "registry:component","title": "UI Settings Toggle Flow",- "description": "A cursor-driven settings composition: the pointer flips a switch, opens a select, and drags a slider, ending in a saved toast. A pure orchestrator — every channel comes from a composed primitive's transition hook.",+ "description": "A two-column settings card: the card and its controls blur-in, then the cursor flips a switch, opens a select, drags a labeled slider, and clicks Save, ending in a saved toast. A pure orchestrator — every channel comes from a composed primitive's transition hook.","dependencies": ["remotion"],- "registryDependencies": ["remocn-ui", "switch", "select", "slider", "cursor", "toast"],+ "registryDependencies": ["remocn-ui", "switch", "select", "slider", "button", "blur-in", "cursor", "toast"],"files": [{"path": "settings-toggle-flow/index.tsx",diff --git a/registry/remocn-ui/settings-toggle-flow/index.tsx b/registry/remocn-ui/settings-toggle-flow/index.tsxindex fa3d8067..2eb3377a 100644--- a/registry/remocn-ui/settings-toggle-flow/index.tsx+++ b/registry/remocn-ui/settings-toggle-flow/index.tsx@@ -1,5 +1,6 @@"use client";+import { Button } from "@/components/remocn/button";import { useButtonTransition } from "@/components/remocn/use-button-transition";import { Cursor } from "@/components/remocn/cursor";import { useCursorPath } from "@/components/remocn/use-cursor-path";@@ -12,16 +13,27 @@ import { Switch } from "@/components/remocn/switch";import { useSwitchTransition } from "@/components/remocn/use-switch-transition";import { Toast } from "@/components/remocn/toast";import { useToastTransition } from "@/components/remocn/use-toast-transition";-import type { RemocnTheme } from "@/lib/remocn-ui";+import { useBlurInTransition } from "@/components/remocn/use-blur-in-transition";+import { type RemocnTheme, useRemocnTheme } from "@/lib/remocn-ui";/**- * Settings toggle flow — a shippable composition scene. Pure orchestrator: a- * cursor walks a settings panel, flipping a Switch, choosing a Select option,- * and dragging a Slider, ending on a "Settings saved" Toast. Each interaction is- * driven by its primitive's hook; the block holds no state/effect/frame of its- * own (see §0B.2). Beat `at` values are the single source of truth (PRD US-B005)- * and frame-synced so each cursor click/press lands on the same frame as the- * state change it triggers.+ * Settings toggle flow — a shippable composition scene wrapped in a centered+ * card (muted stage behind it), laid out as a two-column settings section: a+ * descriptive text block on the LEFT, the controls stacked on the RIGHT (each+ * under its own label, including a "Volume" label for the slider) plus a+ * bottom-right Save button. Pure orchestrator: the card, its header, and each+ * control group blur-in in sequence, then a cursor flips a Switch, opens a+ * Select and picks an option, drags the Slider, and clicks Save — ending on a+ * "Settings saved" Toast. Each interaction is driven by its primitive's hook;+ * the block holds no state/effect/frame of its own. Beat `at` values are the+ * single source of truth and are frame-synced so each cursor click/press lands+ * on the same frame as the state change it triggers. The interaction timeline is+ * shifted by `DEMO` so it begins after the entrance completes.+ *+ * Each control's slot is sized to the control's intrinsic width and parked at+ * the column's left edge, so the primitive's centered `inset:0` content reads as+ * left-aligned under its label. The Select row is rendered LAST so its dropdown+ * panel paints over the Volume row below it while open.*/const DEFAULT_ROWS = [@@ -31,23 +43,79 @@ const DEFAULT_ROWS = [];const DEFAULT_SELECT_ITEMS = ["System", "Light", "Dark"];-// Stage geometry (1280×720): three stacked rows. The Switch, the Select trigger,-// and the Slider thumb each get a cursor target. The Select panel opens below-// its trigger, so the chosen item (index 2 → "Dark") sits ~96px lower.-const SWITCH_Y = 200;-const SWITCH_X = 700;-const SELECT_Y = 332;-const SELECT_X = 640;-const SELECT_ITEM_Y = 444;-const SLIDER_Y = 504;-const SLIDER_START_X = 544;-const SLIDER_END_X = 736;+// Stage geometry (1280×720). Two columns centered on the stage: a text block on+// the left, a controls stack on the right. Cursor X/Y targets are the centers of+// each control as it sits at the right column's left edge.+const LEFT_X = 320;+const RIGHT_X = 700;+const COL_W = 300;++// Notifications row → Switch (intrinsic track ~44px).+const NOTIF_LABEL_Y = 196;+const SWITCH_TOP = 222;+const SWITCH_W = 44;+const SWITCH_H = 28;+const SWITCH_CX = RIGHT_X + SWITCH_W / 2; // 722+const SWITCH_CY = SWITCH_TOP + SWITCH_H / 2; // 236++// Theme row → Select (260px trigger; panel opens below).+const THEME_LABEL_Y = 280;+const SELECT_W = 260;+const TRIGGER_TOP = 320;+const TRIGGER_H = 40;+const TRIGGER_CX = RIGHT_X + SELECT_W / 2; // 830+const TRIGGER_CY = TRIGGER_TOP + TRIGGER_H / 2; // 340+// Opened-panel geometry — the cursor must land on the CENTER of the selected+// (last) row. The panel opens 6px below the trigger; rows are ~33px tall with a+// 2px gap (matching the Select panel) inside a 4px pad. ITEM_CY is derived per+// render from the item count.+const ITEM_CX = TRIGGER_CX;+const PANEL_TOP = TRIGGER_TOP + TRIGGER_H + 6; // 366+const PANEL_PAD = 4;+const ITEM_H = 33;+const ITEM_GAP = 2;++// Volume row → Slider (260px). Tucked just under the Select — the open dropdown+// panel overlays this row only while open. The thumb travels value 20 → 80.+const VOL_LABEL_Y = 380;+const SLIDER_TOP = 400;+const SLIDER_W = 260;+const SLIDER_H = 16;+const SLIDER_CY = SLIDER_TOP + SLIDER_H / 2; // 408+const SLIDER_X0 = RIGHT_X; // 700+const THUMB_X_AT_20 = SLIDER_X0 + 0.2 * SLIDER_W; // 752+const THUMB_X_AT_80 = SLIDER_X0 + 0.8 * SLIDER_W; // 908++// Save button — anchored bottom-right of the controls column (clear of the+// dropdown panel's reach).+const SAVE_W = 160;+const SAVE_LEFT = RIGHT_X + SELECT_W - SAVE_W; // 800 (right edge aligns to 960)+const SAVE_TOP = 544;+const SAVE_H = 40;+const SAVE_CX = SAVE_LEFT + SAVE_W / 2; // 880+const SAVE_CY = SAVE_TOP + SAVE_H / 2; // 564++// Card — bounds the two columns with uniform padding, centered on the stage.+const CARD_PAD = 44;+const CARD_LEFT = LEFT_X - CARD_PAD; // 276+const CARD_TOP = NOTIF_LABEL_Y - CARD_PAD; // 152+const CARD_W = RIGHT_X + SELECT_W + CARD_PAD - CARD_LEFT; // 728+const CARD_H = SAVE_TOP + SAVE_H + CARD_PAD - CARD_TOP; // 476++// Frames the entrance occupies; the interaction timeline starts after it.+const DEMO = 44;export interface SettingsToggleFlowProps {- /** Setting rows (label only). The first row carries the toggle switch. */+ /** Section title shown in the left text column. */+ title?: string;+ /** Supporting paragraph under the title. */+ description?: string;+ /** Setting rows (label only): [0] switch, [1] select, [2] slider. */rows?: { label: string }[];/** Options shown in the Select panel. */selectItems?: string[];+ /** Label of the bottom-right save button. */+ saveLabel?: string;/** Headline of the success toast. */toastTitle?: string;mode?: "light" | "dark";@@ -55,118 +123,287 @@ export interface SettingsToggleFlowProps {}export function SettingsToggleFlow({+ title = "Notification settings",+ description = "Manage how you receive alerts, set your theme, and tune the volume.",rows = DEFAULT_ROWS,selectItems = DEFAULT_SELECT_ITEMS,+ saveLabel = "Save settings",toastTitle = "Settings saved",mode = "light",theme,}: SettingsToggleFlowProps) {+ const resolved = useRemocnTheme(theme, mode);const opts = { mode, theme };+ // Center Y of the selected (last) panel row — derived from the panel geometry+ // so the cursor lands dead-center regardless of how many items there are.+ const lastItem = selectItems.length - 1;+ const ITEM_CY =+ PANEL_TOP + PANEL_PAD + lastItem * (ITEM_H + ITEM_GAP) + ITEM_H / 2;++ // Entrance — card surface fades in place (distance 0 → no slide, so it never+ // becomes a transform containing block), then the header and each control+ // group blur-in staggered, all complete by frame 58 (< first click at 68).+ const cardEnter = useBlurInTransition(+ [{ at: 0, state: "revealed", duration: 18 }],+ { distance: 0 },+ );+ const enterHeader = useBlurInTransition([+ { at: 18, state: "revealed", duration: 16 },+ ]);+ const enterSwitch = useBlurInTransition([+ { at: 24, state: "revealed", duration: 16 },+ ]);+ const enterTheme = useBlurInTransition([+ { at: 30, state: "revealed", duration: 16 },+ ]);+ const enterVolume = useBlurInTransition([+ { at: 36, state: "revealed", duration: 16 },+ ]);+ const enterSave = useBlurInTransition([+ { at: 42, state: "revealed", duration: 16 },+ ]);++ // Resolve a blur-in style to the inline props applied to a positioned group.+ // Each group's slot is already a positioned containing block, so a transform+ // here never hijacks the inset:0 atoms inside it.+ const reveal = (e: { opacity: number; blur: number; translateX: number; translateY: number }) => ({+ opacity: e.opacity,+ filter: e.blur > 0 ? `blur(${e.blur}px)` : "none",+ transform: `translate(${e.translateX}px, ${e.translateY}px)`,+ });+// Cursor: click Switch (24) → click Select trigger (55) → click item (80) →- // press Slider thumb (105) and drag to 150 → release. Each click/press `at`- // equals the driven primitive's `at`.+ // press Slider thumb (105) and drag to 150 → release → click Save (180). Each+ // click/press `at` equals the driven primitive's `at`; all shifted by DEMO.const cursorStyle = useCursorPath([- { at: 0, x: 96, y: 80 },- { at: 24, x: SWITCH_X, y: SWITCH_Y, duration: 20 },- { at: 24, x: SWITCH_X, y: SWITCH_Y, click: true, duration: 0 },- { at: 55, x: SELECT_X, y: SELECT_Y, duration: 22 },- { at: 55, x: SELECT_X, y: SELECT_Y, click: true, duration: 0 },- { at: 80, x: SELECT_X, y: SELECT_ITEM_Y, duration: 18 },- { at: 80, x: SELECT_X, y: SELECT_ITEM_Y, click: true, duration: 0 },- { at: 105, x: SLIDER_START_X, y: SLIDER_Y, duration: 18 },- { at: 105, x: SLIDER_START_X, y: SLIDER_Y, press: true, duration: 0 },- { at: 150, x: SLIDER_END_X, y: SLIDER_Y, press: true, duration: 45 },- { at: 158, x: SLIDER_END_X, y: SLIDER_Y, duration: 0 },+ { at: 0, x: 220, y: 130 },+ { at: 24 + DEMO, x: SWITCH_CX, y: SWITCH_CY, duration: 20 },+ { at: 24 + DEMO, x: SWITCH_CX, y: SWITCH_CY, click: true, duration: 0 },+ { at: 55 + DEMO, x: TRIGGER_CX, y: TRIGGER_CY, duration: 22 },+ { at: 55 + DEMO, x: TRIGGER_CX, y: TRIGGER_CY, click: true, duration: 0 },+ { at: 80 + DEMO, x: ITEM_CX, y: ITEM_CY, duration: 18 },+ { at: 80 + DEMO, x: ITEM_CX, y: ITEM_CY, click: true, duration: 0 },+ { at: 105 + DEMO, x: THUMB_X_AT_20, y: SLIDER_CY, duration: 18 },+ { at: 105 + DEMO, x: THUMB_X_AT_20, y: SLIDER_CY, press: true, duration: 0 },+ { at: 150 + DEMO, x: THUMB_X_AT_80, y: SLIDER_CY, press: true, duration: 45 },+ { at: 158 + DEMO, x: THUMB_X_AT_80, y: SLIDER_CY, duration: 0 },+ { at: 180 + DEMO, x: SAVE_CX, y: SAVE_CY, duration: 18 },+ { at: 180 + DEMO, x: SAVE_CX, y: SAVE_CY, click: true, duration: 0 },]);- // Beat 2 — switch turns on at the click (24).+ // Switch turns on at the click (24 + DEMO).const switchStyle = useSwitchTransition(- [{ at: 24, state: "checked", duration: 12 }],+ [{ at: 24 + DEMO, state: "checked", duration: 12 }],opts,);- // Beats 4/7 — select panel opens at 55, closes at 90.+ // Select panel opens at 55 + DEMO, closes at 90 + DEMO.const panelStyle = useSelectTransition([- { at: 55, state: "opened", duration: 14 },- { at: 90, state: "closed", duration: 12 },+ { at: 55 + DEMO, state: "opened", duration: 14 },+ { at: 90 + DEMO, state: "closed", duration: 12 },],opts,);- // The select trigger button "click" — hover into the open press at 55.+ // The select trigger "click" — hover into the open press at 55 + DEMO.const triggerStyle = useButtonTransition([- { at: 45, state: "hover", duration: 8 },- { at: 55, state: "press", duration: 8 },+ { at: 45 + DEMO, state: "hover", duration: 8 },+ { at: 55 + DEMO, state: "press", duration: 8 },],{ variant: "outline", ...opts },);- // Beat 6 — the last item (index 2) is highlighted, pressed, then selected at 80.+ // The last item is highlighted, pressed, then selected at 80 + DEMO.const itemStyle = useSelectItemTransition([- { at: 68, state: "hover", duration: 8 },- { at: 78, state: "press", duration: 6 },- { at: 80, state: "selected", duration: 10 },+ { at: 68 + DEMO, state: "hover", duration: 8 },+ { at: 78 + DEMO, state: "press", duration: 6 },+ { at: 80 + DEMO, state: "selected", duration: 10 },],opts,);- // Beat 9 — dual-channel slider: value eases 20 → 80 across the drag while the- // thumb idles → hover → press → idle, all from one hook.+ // Dual-channel slider: value eases 20 → 80 across the drag while the thumb+ // idles → press → idle, all from one hook. Holds 20 through the entrance.const sliderStyle = useSliderTransition([{ at: 0, value: 20, thumbState: "idle" },- { at: 105, thumbState: "press", duration: 6 },- { at: 105, value: 20 },- { at: 150, value: 80, duration: 45, easing: "inOut" },- { at: 158, thumbState: "idle", duration: 8 },+ { at: 105 + DEMO, thumbState: "press", duration: 6 },+ { at: 105 + DEMO, value: 20 },+ { at: 150 + DEMO, value: 80, duration: 45, easing: "inOut" },+ { at: 158 + DEMO, thumbState: "idle", duration: 8 },]);- // Beats 10/11 — toast enters at 155 (after the drag), auto-dismisses at 215.- // The toast hook tints by `mode` only; `theme` rides the component prop below.+ // Save button — hovers, presses into the click at 180 + DEMO, then shows a+ // success check. The toast follows it.+ const saveStyle = useButtonTransition(+ [+ { at: 172 + DEMO, state: "hover", duration: 8 },+ { at: 180 + DEMO, state: "press", duration: 6 },+ { at: 188 + DEMO, state: "success", duration: 14 },+ ],+ opts,+ );++ // Toast enters after the Save click, auto-dismisses 60 frames later. The toast+ // hook tints by `mode` only; `theme` rides the component prop below.const toastStyle = useToastTransition([- { at: 155, state: "visible", duration: 12 },- { at: 215, state: "hidden", duration: 12 },+ { at: 196 + DEMO, state: "visible", duration: 12 },+ { at: 256 + DEMO, state: "hidden", duration: 12 },],{ mode },);+ const rowLabelStyle = {+ fontSize: 14,+ fontWeight: 500,+ letterSpacing: "-0.01em",+ color: resolved.foreground,+ } as const;+return (- <div style={{ position: "relative", width: "100%", height: "100%" }}>- {/* Switch row — its own relative box scopes the primitive's inset:0. */}+ <div+ style={{+ position: "relative",+ width: "100%",+ height: "100%",+ background: resolved.muted,+ fontFamily:+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",+ }}+ >+ {/* Card surface — fades in place (distance 0, no transform). */}<divstyle={{position: "absolute",- left: 0,- right: 0,- top: SWITCH_Y - 32,- height: 64,+ left: CARD_LEFT,+ top: CARD_TOP,+ width: CARD_W,+ height: CARD_H,+ boxSizing: "border-box",+ background: resolved.background,+ border: `1px solid ${resolved.border}`,+ borderRadius: 16,+ 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",+ }}+ />++ {/* LEFT — descriptive text column. */}+ <div+ style={{+ position: "absolute",+ left: LEFT_X,+ top: NOTIF_LABEL_Y,+ width: COL_W,+ display: "flex",+ flexDirection: "column",+ gap: 10,+ ...reveal(enterHeader),}}>- <Switch- style={switchStyle}- label={rows[0]?.label ?? "Notifications"}- mode={mode}- theme={theme}- />+ <div+ style={{+ fontSize: 22,+ lineHeight: "28px",+ fontWeight: 600,+ letterSpacing: "-0.02em",+ color: resolved.foreground,+ }}+ >+ {title}+ </div>+ <div+ style={{+ fontSize: 14,+ lineHeight: "22px",+ color: resolved.mutedForeground,+ }}+ >+ {description}+ </div></div>- {/* Select row — the trigger; the panel opens below into the item row. */}+ {/* RIGHT — Notifications (switch). */}+ <div+ style={{+ position: "absolute",+ left: RIGHT_X,+ top: NOTIF_LABEL_Y,+ ...rowLabelStyle,+ ...reveal(enterSwitch),+ }}+ >+ {rows[0]?.label ?? "Notifications"}+ </div>+ <div+ style={{+ position: "absolute",+ left: RIGHT_X,+ top: SWITCH_TOP,+ width: SWITCH_W,+ height: SWITCH_H,+ ...reveal(enterSwitch),+ }}+ >+ <Switch style={switchStyle} mode={mode} theme={theme} />+ </div>++ {/* RIGHT — Volume (slider). Rendered before the Select so the dropdown+ panel paints over this row while open. */}+ <div+ style={{+ position: "absolute",+ left: RIGHT_X,+ top: VOL_LABEL_Y,+ ...rowLabelStyle,+ ...reveal(enterVolume),+ }}+ >+ {rows[2]?.label ?? "Volume"}+ </div>+ <div+ style={{+ position: "absolute",+ left: SLIDER_X0,+ top: SLIDER_TOP,+ ...reveal(enterVolume),+ }}+ >+ <Slider style={sliderStyle} width={SLIDER_W} mode={mode} theme={theme} />+ </div>++ {/* RIGHT — Theme (select). Last in the DOM so the open panel overlays the+ Volume row below the trigger. */}+ <div+ style={{+ position: "absolute",+ left: RIGHT_X,+ top: THEME_LABEL_Y,+ ...rowLabelStyle,+ ...reveal(enterTheme),+ }}+ >+ {rows[1]?.label ?? "Theme"}+ </div><divstyle={{position: "absolute",- left: 0,- right: 0,- top: SELECT_Y - 32,- height: 240,+ left: RIGHT_X,+ top: TRIGGER_TOP,+ width: SELECT_W,+ height: TRIGGER_H,+ ...reveal(enterTheme),}}><Selectstyle={panelStyle}- label={rows[1]?.label ?? "Theme"}+ label={selectItems[0] ?? "System"}items={selectItems}triggerStyle={triggerStyle}itemStyles={selectItems.map((_, i) =>@@ -177,16 +414,19 @@ export function SettingsToggleFlow({/></div>- {/* Slider row. */}+ {/* Save button — bottom-right of the controls column; the cursor clicks it+ (180 + DEMO) just before the toast appears. */}<divstyle={{position: "absolute",- left: "50%",- top: SLIDER_Y,- transform: "translate(-50%, -50%)",+ left: SAVE_LEFT,+ top: SAVE_TOP,+ width: SAVE_W,+ height: SAVE_H,+ ...reveal(enterSave),}}>- <Slider style={sliderStyle} width={320} mode={mode} theme={theme} />+ <Button label={saveLabel} style={saveStyle} mode={mode} theme={theme} /></div>{/* Success toast, anchored bottom-right. */}diff --git a/registry/remocn-ui/toggle-group/index.tsx b/registry/remocn-ui/toggle-group/index.tsxindex bba1b919..f5af59f1 100644--- a/registry/remocn-ui/toggle-group/index.tsx+++ b/registry/remocn-ui/toggle-group/index.tsx@@ -29,9 +29,20 @@ export interface ToggleGroupProps {size?: ToggleGroupSize;theme?: Partial<RemocnTheme>;mode?: "light" | "dark";+ /** Horizontal placement of the track within its (full-width) slot. */+ align?: "start" | "center" | "end";className?: string;}+/** Map an `align` value to a flexbox `justifyContent`. */+function justify(align: "start" | "center" | "end"): string {+ return align === "start"+ ? "flex-start"+ : align === "end"+ ? "flex-end"+ : "center";+}+/** Default segments. */const DEFAULT_ITEMS: ToggleGroupItem[] = [{ value: "Monthly", label: "Monthly" },@@ -118,6 +129,7 @@ export function ToggleGroup({size = "default",theme: themeOverride,mode,+ align = "center",className,}: ToggleGroupProps) {const theme = useRemocnTheme(themeOverride, mode);@@ -139,7 +151,7 @@ export function ToggleGroup({inset: 0,display: "flex",alignItems: "center",- justifyContent: "center",+ justifyContent: justify(align),// OPAQUE wrapper — a self-contained widget, not a modal layer (like Tabs).background: theme.background,fontFamily: