Skip to content

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

feat: remove bg from remocnui

dev_wandry3696a2441931
diff --git a/components/docs/examples/accordion-example.tsx b/components/docs/examples/accordion-example.tsx
index 3b5ffd42..54e4ce0b 100644
--- a/components/docs/examples/accordion-example.tsx
+++ b/components/docs/examples/accordion-example.tsx
@@ -4,33 +4,28 @@ import { Accordion } from "@/registry/remocn-ui/accordion";
import { useAccordionTransition } from "@/registry/remocn-ui/accordion/use-accordion-transition";
export const accordionExampleControls = [
- "title", "content", "variant", "mode",
+ "title", "content", "variant",
] as const;
export interface AccordionExampleProps {
title?: string;
content?: string;
variant?: "default" | "ghost";
- mode?: "light" | "dark";
}
export const AccordionExampleScene = (p: AccordionExampleProps = {}) => {
- // Forward honored color props into the hook so the interpolated card
- // background tracks variant/mode — otherwise the baked light background wins
- // (via `style` precedence) and dark mode leaves a white card.
const style = useAccordionTransition(
[
{ at: 18, state: "opened", duration: 16 },
{ at: 78, state: "closed", duration: 12 },
],
- { variant: p.variant, mode: p.mode },
+ { variant: p.variant },
);
return (
<Accordion
title={p.title ?? "Is it accessible?"}
content={p.content ?? "Yes. It adheres to the WAI-ARIA design pattern."}
variant={p.variant ?? "default"}
- mode={p.mode ?? "light"}
style={style}
/>
);
@@ -42,7 +37,6 @@ export const accordionExampleCode = (
const title = values.title as string | undefined;
const content = values.content as string | undefined;
const variant = values.variant as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (title !== undefined && title !== "Is it accessible?")
@@ -54,15 +48,12 @@ export const accordionExampleCode = (
props.push(`content="${content}"`);
if (variant !== undefined && variant !== "default")
props.push(`variant="${variant}"`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const propsStr = props.length ? `\n ${props.join("\n ")}\n ` : "";
- // variant/mode are also forwarded into the hook so the animated card bg tracks them.
const hookOpts: string[] = [];
if (variant !== undefined && variant !== "default")
hookOpts.push(`variant: "${variant}"`);
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
return `import { Accordion } from "@/components/remocn/accordion";
diff --git a/components/docs/examples/checkbox-example.tsx b/components/docs/examples/checkbox-example.tsx
index d048f069..c272bac3 100644
--- a/components/docs/examples/checkbox-example.tsx
+++ b/components/docs/examples/checkbox-example.tsx
@@ -3,26 +3,24 @@
import { Checkbox } from "@/registry/remocn-ui/checkbox";
import { useCheckboxTransition } from "@/registry/remocn-ui/checkbox/use-checkbox-transition";
-export const checkboxExampleControls = ["label", "size", "primary", "mode"] as const;
+export const checkboxExampleControls = ["label", "size", "primary"] as const;
export interface CheckboxExampleProps {
label?: string;
size?: "sm" | "default" | "lg";
primary?: string;
- mode?: "light" | "dark";
}
export const CheckboxExampleScene = (p: CheckboxExampleProps = {}) => {
const style = useCheckboxTransition([
{ at: 18, state: "checked", duration: 14 },
{ at: 78, state: "unchecked", duration: 12 },
- ], { mode: p.mode, primary: p.primary });
+ ], { primary: p.primary });
return (
<Checkbox
label={p.label ?? "Accept terms and conditions"}
size={p.size ?? "default"}
primary={p.primary}
- mode={p.mode ?? "light"}
style={style}
/>
);
@@ -34,19 +32,16 @@ export const checkboxExampleCode = (
const label = values.label as string | undefined;
const size = values.size as string | undefined;
const primary = values.primary as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (label !== undefined && label !== "Accept terms and conditions")
props.push(`label="${label}"`);
if (size !== undefined && size !== "default") props.push(`size="${size}"`);
if (primary !== undefined) props.push(`primary="${primary}"`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const propsStr = props.length ? ` ${props.join(" ")}` : "";
const hookOpts: string[] = [];
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
if (primary !== undefined) hookOpts.push(`primary: "${primary}"`);
const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
diff --git a/components/docs/examples/context-menu-example.tsx b/components/docs/examples/context-menu-example.tsx
index e57bacdd..49b5d4d5 100644
--- a/components/docs/examples/context-menu-example.tsx
+++ b/components/docs/examples/context-menu-example.tsx
@@ -107,7 +107,7 @@ export const ContextMenuExampleScene = (p: ContextMenuExampleProps = {}) => {
/>
</div>
- <Cursor style={cursorStyle} variant="pointer" mode={p.mode ?? "light"} />
+ <Cursor style={cursorStyle} variant="pointer" />
</div>
);
};
diff --git a/components/docs/examples/cursor-example.tsx b/components/docs/examples/cursor-example.tsx
index 743e1637..77a5efff 100644
--- a/components/docs/examples/cursor-example.tsx
+++ b/components/docs/examples/cursor-example.tsx
@@ -12,14 +12,12 @@ export interface CursorExampleProps {
variant?: "arrow" | "pointer";
size?: number;
rippleColor?: string;
- mode?: "light" | "dark";
}
export const cursorExampleControls = [
"variant",
"size",
"rippleColor",
- "mode",
] as const;
export const CursorExampleScene = (p: CursorExampleProps = {}) => {
@@ -29,15 +27,12 @@ export const CursorExampleScene = (p: CursorExampleProps = {}) => {
{ at: 72, x: BTN_X, y: BTN_Y, click: true, duration: 0 },
]);
- const buttonStyle = useButtonTransition(
- [
- { at: 40, state: "hover", duration: 16 },
- { at: 68, state: "press", duration: 8 },
- { at: 76, state: "loading", duration: 6 },
- { at: 108, state: "success", duration: 16 },
- ],
- { mode: p.mode },
- );
+ const buttonStyle = useButtonTransition([
+ { at: 40, state: "hover", duration: 16 },
+ { at: 68, state: "press", duration: 8 },
+ { at: 76, state: "loading", duration: 6 },
+ { at: 108, state: "success", duration: 16 },
+ ]);
return (
<div style={{ position: "relative", width: "100%", height: "100%" }}>
@@ -49,14 +44,13 @@ export const CursorExampleScene = (p: CursorExampleProps = {}) => {
transform: "translate(-50%, -50%)",
}}
>
- <Button label="Continue" style={buttonStyle} mode={p.mode ?? "light"} />
+ <Button label="Continue" style={buttonStyle} />
</div>
<Cursor
style={cursorStyle}
variant={p.variant ?? "arrow"}
size={p.size ?? 28}
rippleColor={p.rippleColor}
- mode={p.mode ?? "light"}
/>
</div>
);
@@ -68,10 +62,6 @@ export const cursorExampleCode = (
const variant = values.variant as string | undefined;
const size = values.size as number | undefined;
const rippleColor = values.rippleColor as string | undefined;
- const mode = values.mode as string | undefined;
-
- // Button trigger keeps just `mode`; the <Cursor> shows the full honored set.
- const modeStr = mode !== undefined && mode !== "light" ? ` mode="${mode}"` : "";
const cursorProps: string[] = [];
if (variant !== undefined && variant !== "arrow")
@@ -79,13 +69,8 @@ export const cursorExampleCode = (
if (size !== undefined && size !== 28) cursorProps.push(`size={${size}}`);
if (rippleColor !== undefined && rippleColor !== "#171717")
cursorProps.push(`rippleColor="${rippleColor}"`);
- if (mode !== undefined && mode !== "light") cursorProps.push(`mode="${mode}"`);
const cursorPropsStr = cursorProps.length ? ` ${cursorProps.join(" ")}` : "";
- const hookOpts: string[] = [];
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
- const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
-
return `import { Cursor } from "@/components/remocn/cursor";
import { useCursorPath } from "@/components/remocn/use-cursor-path";
import { Button } from "@/components/remocn/button";
@@ -109,7 +94,7 @@ export const Scene = () => {
{ at: 68, state: "press", duration: 8 },
{ at: 76, state: "loading", duration: 6 },
{ at: 108, state: "success", duration: 16 },
- ]${optsStr});
+ ]);
return (
<div style={{ position: "relative", width: "100%", height: "100%" }}>
@@ -121,7 +106,7 @@ export const Scene = () => {
transform: "translate(-50%, -50%)",
}}
>
- <Button label="Continue" style={buttonStyle}${modeStr} />
+ <Button label="Continue" style={buttonStyle} />
</div>
<Cursor style={cursorStyle}${cursorPropsStr} />
</div>
diff --git a/components/docs/examples/index.tsx b/components/docs/examples/index.tsx
index a0e4c4b2..6e19aaac 100644
--- a/components/docs/examples/index.tsx
+++ b/components/docs/examples/index.tsx
@@ -105,6 +105,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"alert-dialog-example": {
Component: AlertDialogExampleScene,
@@ -149,6 +150,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"radio-example": {
Component: RadioExampleScene,
@@ -157,6 +159,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"switch-example": {
Component: SwitchExampleScene,
@@ -174,6 +177,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"select-example": {
Component: SelectExampleScene,
@@ -201,6 +205,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"cursor-example": {
Component: CursorExampleScene,
@@ -210,6 +215,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"toast-example": {
Component: ToastExampleScene,
@@ -219,6 +225,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"command-menu-example": {
Component: CommandMenuExampleScene,
@@ -258,6 +265,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"slider-example": {
Component: SliderExampleScene,
@@ -267,6 +275,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"combobox-example": {
Component: ComboboxExampleScene,
@@ -313,6 +322,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"resizable-example": {
Component: ResizableExampleScene,
diff --git a/components/docs/examples/input-example.tsx b/components/docs/examples/input-example.tsx
index fe9109ef..1b4c9c8b 100644
--- a/components/docs/examples/input-example.tsx
+++ b/components/docs/examples/input-example.tsx
@@ -4,7 +4,7 @@ import { Input } from "@/registry/remocn-ui/input";
import { useInputTransition } from "@/registry/remocn-ui/input/use-input-transition";
export const inputExampleControls = [
- "placeholder", "value", "size", "primary", "mode",
+ "placeholder", "value", "size", "primary",
] as const;
export interface InputExampleProps {
@@ -12,7 +12,6 @@ export interface InputExampleProps {
value?: string;
size?: "sm" | "default" | "lg";
primary?: string;
- mode?: "light" | "dark";
}
export const InputExampleScene = (p: InputExampleProps = {}) => {
@@ -21,14 +20,13 @@ export const InputExampleScene = (p: InputExampleProps = {}) => {
{ at: 24, state: "active", duration: 10 },
{ at: 40, state: "typing", duration: 22 },
{ at: 78, state: "invalid", duration: 12 },
- ], { mode: p.mode, primary: p.primary });
+ ], { primary: p.primary });
return (
<Input
placeholder={p.placeholder ?? "[email protected]"}
value={p.value ?? "[email protected]"}
size={p.size ?? "default"}
primary={p.primary}
- mode={p.mode ?? "light"}
style={style}
/>
);
@@ -41,7 +39,6 @@ export const inputExampleCode = (
const value = values.value as string | undefined;
const size = values.size as string | undefined;
const primary = values.primary as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (placeholder !== undefined && placeholder !== "[email protected]")
@@ -50,12 +47,10 @@ export const inputExampleCode = (
props.push(`value="${value}"`);
if (size !== undefined && size !== "default") props.push(`size="${size}"`);
if (primary !== undefined) props.push(`primary="${primary}"`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const propsStr = props.length ? `\n ${props.join("\n ")}\n ` : "";
const hookOpts: string[] = [];
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
if (primary !== undefined) hookOpts.push(`primary: "${primary}"`);
const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
diff --git a/components/docs/examples/radio-example.tsx b/components/docs/examples/radio-example.tsx
index 2e908c11..b0eeddb6 100644
--- a/components/docs/examples/radio-example.tsx
+++ b/components/docs/examples/radio-example.tsx
@@ -3,26 +3,24 @@
import { Radio } from "@/registry/remocn-ui/radio";
import { useRadioTransition } from "@/registry/remocn-ui/radio/use-radio-transition";
-export const radioExampleControls = ["label", "size", "primary", "mode"] as const;
+export const radioExampleControls = ["label", "size", "primary"] as const;
export interface RadioExampleProps {
label?: string;
size?: "sm" | "default" | "lg";
primary?: string;
- mode?: "light" | "dark";
}
export const RadioExampleScene = (p: RadioExampleProps = {}) => {
const style = useRadioTransition([
{ at: 18, state: "checked", duration: 14 },
{ at: 78, state: "unchecked", duration: 12 },
- ], { mode: p.mode, primary: p.primary });
+ ], { primary: p.primary });
return (
<Radio
label={p.label ?? "Subscribe to updates"}
size={p.size ?? "default"}
primary={p.primary}
- mode={p.mode ?? "light"}
style={style}
/>
);
@@ -34,19 +32,16 @@ export const radioExampleCode = (
const label = values.label as string | undefined;
const size = values.size as string | undefined;
const primary = values.primary as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (label !== undefined && label !== "Subscribe to updates")
props.push(`label="${label}"`);
if (size !== undefined && size !== "default") props.push(`size="${size}"`);
if (primary !== undefined) props.push(`primary="${primary}"`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const propsStr = props.length ? ` ${props.join(" ")}` : "";
const hookOpts: string[] = [];
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
if (primary !== undefined) hookOpts.push(`primary: "${primary}"`);
const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
diff --git a/components/docs/examples/resizable-example.tsx b/components/docs/examples/resizable-example.tsx
index 9deb97a7..b46b1093 100644
--- a/components/docs/examples/resizable-example.tsx
+++ b/components/docs/examples/resizable-example.tsx
@@ -47,7 +47,7 @@ export const ResizableExampleScene = (p: ResizableExampleProps = {}) => {
direction={p.direction ?? "horizontal"}
mode={p.mode ?? "light"}
/>
- <Cursor style={cursorStyle} variant="pointer" mode={p.mode ?? "light"} />
+ <Cursor style={cursorStyle} variant="pointer" />
</div>
);
};
diff --git a/components/docs/examples/skeleton-example.tsx b/components/docs/examples/skeleton-example.tsx
index 0d1f1856..b1fb73bd 100644
--- a/components/docs/examples/skeleton-example.tsx
+++ b/components/docs/examples/skeleton-example.tsx
@@ -6,18 +6,16 @@ import type { SkeletonLayout } from "@/registry/remocn-ui/skeleton";
export interface SkeletonExampleProps {
layout?: SkeletonLayout;
- mode?: "light" | "dark";
}
-export const skeletonExampleControls = ["layout", "mode"] as const;
+export const skeletonExampleControls = ["layout"] as const;
export const SkeletonExampleScene = (p: SkeletonExampleProps = {}) => {
// Shimmer for ~3 full sweep cycles (180 frames) as if waiting on data, then
// crossfade to real content.
- const skeletonStyle = useSkeletonTransition(
- [{ at: 180, state: "loaded", duration: 16 }],
- { mode: p.mode },
- );
+ const skeletonStyle = useSkeletonTransition([
+ { at: 180, state: "loaded", duration: 16 },
+ ]);
return (
<div
@@ -32,7 +30,6 @@ export const SkeletonExampleScene = (p: SkeletonExampleProps = {}) => {
<Skeleton
style={skeletonStyle}
layout={p.layout ?? "card"}
- mode={p.mode ?? "light"}
>
{/* Real content — defines the box size; revealed on crossfade. */}
<div style={{ display: "flex", gap: 14, alignItems: "center" }}>
@@ -73,16 +70,12 @@ export const skeletonExampleCode = (
values: Record<string, unknown> = {},
): string => {
const layout = values.layout as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (layout !== undefined && layout !== "card") props.push(`layout="${layout}"`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const extraProps = props.length ? `\n ${props.join("\n ")}\n ` : "";
- const hookOpts: string[] = [];
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
- const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
+ const optsStr = "";
return `import { Skeleton } from "@/components/remocn/skeleton";
import { useSkeletonTransition } from "@/components/remocn/use-skeleton-transition";
diff --git a/components/docs/examples/slider-example.tsx b/components/docs/examples/slider-example.tsx
index 41cc1e03..4f01c874 100644
--- a/components/docs/examples/slider-example.tsx
+++ b/components/docs/examples/slider-example.tsx
@@ -12,11 +12,10 @@ const THUMB_START_X = 544; // canvas x at value 20
const THUMB_END_X = 736; // canvas x at value 80
const THUMB_Y = 360; // canvas y of track center
-export const sliderExampleControls = ["showValue", "mode"] as const;
+export const sliderExampleControls = ["showValue"] as const;
export interface SliderExampleProps {
showValue?: boolean;
- mode?: "light" | "dark";
}
export const SliderExampleScene = (p: SliderExampleProps = {}) => {
@@ -50,9 +49,9 @@ export const SliderExampleScene = (p: SliderExampleProps = {}) => {
transform: "translate(-50%, -50%)",
}}
>
- <Slider style={sliderStyle} width={320} showValue={p.showValue ?? true} mode={p.mode ?? "light"} />
+ <Slider style={sliderStyle} width={320} showValue={p.showValue ?? true} />
</div>
- <Cursor style={cursorStyle} variant="pointer" mode={p.mode ?? "light"} />
+ <Cursor style={cursorStyle} variant="pointer" />
</div>
);
};
@@ -61,15 +60,12 @@ export const sliderExampleCode = (
values: Record<string, unknown> = {},
): string => {
const showValue = values.showValue as boolean | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (showValue !== undefined && showValue !== true)
props.push(`showValue={${showValue}}`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const sliderPropsStr = props.length ? ` ${props.join(" ")}` : "";
- const cursorModeStr = mode !== undefined && mode !== "light" ? ` mode="${mode}"` : "";
return `import { Cursor } from "@/components/remocn/cursor";
import { useCursorPath } from "@/components/remocn/use-cursor-path";
import { Slider } from "@/components/remocn/slider";
@@ -115,7 +111,7 @@ export const Scene = () => {
>
<Slider style={sliderStyle} width={320}${sliderPropsStr} />
</div>
- <Cursor style={cursorStyle} variant="pointer"${cursorModeStr} />
+ <Cursor style={cursorStyle} variant="pointer" />
</div>
);
};`;
diff --git a/components/docs/examples/stepper-example.tsx b/components/docs/examples/stepper-example.tsx
index 93f9e4b6..f772cd92 100644
--- a/components/docs/examples/stepper-example.tsx
+++ b/components/docs/examples/stepper-example.tsx
@@ -5,10 +5,9 @@ import { useStepperTransition } from "@/registry/remocn-ui/stepper/use-stepper-t
export interface StepperExampleProps {
steps?: string[];
- mode?: "light" | "dark";
}
-export const stepperExampleControls = ["steps", "mode"] as const;
+export const stepperExampleControls = ["steps"] as const;
export const StepperExampleScene = (p: StepperExampleProps = {}) => {
// Advance through 3 steps: "Account" (0) → "Plan" (1) → "Done" (2).
@@ -26,7 +25,6 @@ export const StepperExampleScene = (p: StepperExampleProps = {}) => {
<Stepper
style={stepperStyle}
steps={p.steps ?? ["Account", "Plan", "Done"]}
- mode={p.mode ?? "light"}
/>
</div>
);
@@ -36,11 +34,9 @@ export const stepperExampleCode = (
values: Record<string, unknown> = {},
): string => {
const steps = values.steps as string[] | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (steps !== undefined) props.push(`steps={${JSON.stringify(steps)}}`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const extraProps = props.length ? `\n ${props.join("\n ")}\n ` : "";
return `import { Stepper } from "@/components/remocn/stepper";
diff --git a/components/docs/examples/tabs-example.tsx b/components/docs/examples/tabs-example.tsx
index 3ae56f07..a9c81a22 100644
--- a/components/docs/examples/tabs-example.tsx
+++ b/components/docs/examples/tabs-example.tsx
@@ -5,22 +5,20 @@ import { useTabsTransition } from "@/registry/remocn-ui/tabs/use-tabs-transition
export interface TabsExampleProps {
variant?: "pill" | "underline";
- mode?: "light" | "dark";
}
-export const tabsExampleControls = ["variant", "mode"] as const;
+export const tabsExampleControls = ["variant"] as const;
export const TabsExampleScene = (p: TabsExampleProps = {}) => {
const style = useTabsTransition([
{ at: 18, state: "Account", duration: 16 },
{ at: 58, state: "Password", duration: 18 },
{ at: 94, state: "Settings", duration: 12 },
- ], { variant: p.variant, mode: p.mode });
+ ], { variant: p.variant });
return (
<Tabs
style={style}
variant={p.variant ?? "pill"}
- mode={p.mode ?? "light"}
/>
);
};
@@ -29,16 +27,13 @@ export const tabsExampleCode = (
values: Record<string, unknown> = {},
): string => {
const variant = values.variant as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (variant !== undefined && variant !== "pill") props.push(`variant="${variant}"`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const extraProps = props.length ? `\n ${props.join("\n ")}` : "";
const hookOpts: string[] = [];
if (variant !== undefined && variant !== "pill") hookOpts.push(`variant: "${variant}"`);
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
return `import { Tabs } from "@/components/remocn/tabs";
diff --git a/components/docs/examples/toast-example.tsx b/components/docs/examples/toast-example.tsx
index 8adf6204..aef0cb85 100644
--- a/components/docs/examples/toast-example.tsx
+++ b/components/docs/examples/toast-example.tsx
@@ -12,14 +12,13 @@ const BTN_X = 620; // cursor tip target X (the pointer hotspot lands here)
const BTN_Y = 360; // cursor tip target Y
export const toastExampleControls = [
- "title", "description", "variant", "mode",
+ "title", "description", "variant",
] as const;
export interface ToastExampleProps {
title?: string;
description?: string;
variant?: "default" | "success" | "error";
- mode?: "light" | "dark";
}
export const ToastExampleScene = (p: ToastExampleProps = {}) => {
@@ -32,24 +31,18 @@ export const ToastExampleScene = (p: ToastExampleProps = {}) => {
// Button: idle → hover (cursor on button) → press → idle after click.
// The click lands at 68; press starts just before so the dip is visible.
- const buttonStyle = useButtonTransition(
- [
- { at: 40, state: "hover", duration: 16 },
- { at: 62, state: "press", duration: 8 },
- { at: 76, state: "idle", duration: 10 },
- ],
- { mode: p.mode },
- );
+ const buttonStyle = useButtonTransition([
+ { at: 40, state: "hover", duration: 16 },
+ { at: 62, state: "press", duration: 8 },
+ { at: 76, state: "idle", duration: 10 },
+ ]);
// Toast: slides in from below right after the click, holds ~60 frames, then
// auto-dismisses. DEFAULT_DURATION is 12; explicit durations here are clear.
- const toastStyle = useToastTransition(
- [
- { at: 84, state: "visible", duration: 12 },
- { at: 144, state: "hidden", duration: 12 },
- ],
- { mode: p.mode },
- );
+ const toastStyle = useToastTransition([
+ { at: 84, state: "visible", duration: 12 },
+ { at: 144, state: "hidden", duration: 12 },
+ ]);
return (
<div style={{ position: "relative", width: "100%", height: "100%" }}>
@@ -63,7 +56,7 @@ export const ToastExampleScene = (p: ToastExampleProps = {}) => {
transform: "translate(-50%, -50%)",
}}
>
- <Button label="Show toast" style={buttonStyle} mode={p.mode ?? "light"} />
+ <Button label="Show toast" style={buttonStyle} mode="light" />
</div>
{/* Toast anchored bottom-right, 24px from edges */}
@@ -78,7 +71,6 @@ export const ToastExampleScene = (p: ToastExampleProps = {}) => {
title={p.title ?? "Changes saved"}
description={p.description ?? "Your profile has been updated."}
variant={p.variant ?? "success"}
- mode={p.mode ?? "light"}
style={toastStyle}
/>
</div>
@@ -94,7 +86,6 @@ export const toastExampleCode = (
const title = values.title as string | undefined;
const description = values.description as string | undefined;
const variant = values.variant as string | undefined;
- const mode = values.mode as string | undefined;
const toastProps: string[] = [];
if (title !== undefined && title !== "Changes saved")
@@ -106,14 +97,7 @@ export const toastExampleCode = (
toastProps.push(`description="${description}"`);
if (variant !== undefined && variant !== "success")
toastProps.push(`variant="${variant}"`);
- if (mode !== undefined && mode !== "light") toastProps.push(`mode="${mode}"`);
-
- const btnModeStr =
- mode !== undefined && mode !== "light" ? ` mode="${mode}"` : "";
- const hookOpts: string[] = [];
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
- const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
const toastPropsStr = toastProps.length
? `\n ${toastProps.join("\n ")}\n `
: "";
@@ -141,13 +125,13 @@ export const Scene = () => {
{ at: 40, state: "hover", duration: 16 },
{ at: 62, state: "press", duration: 8 },
{ at: 76, state: "idle", duration: 10 },
- ]${optsStr});
+ ]);
// Toast slides in after the click, holds ~60 frames, then auto-dismisses.
const toastStyle = useToastTransition([
{ at: 84, state: "visible", duration: 12 },
{ at: 144, state: "hidden", duration: 12 },
- ]${optsStr});
+ ]);
return (
<div style={{ position: "relative", width: "100%", height: "100%" }}>
@@ -159,7 +143,7 @@ export const Scene = () => {
transform: "translate(-50%, -50%)",
}}
>
- <Button label="Show toast" style={buttonStyle}${btnModeStr} />
+ <Button label="Show toast" style={buttonStyle} />
</div>
<div style={{ position: "absolute", right: 24, bottom: 24 }}>
diff --git a/components/docs/examples/toggle-group-example.tsx b/components/docs/examples/toggle-group-example.tsx
index 5aadca62..44e7388d 100644
--- a/components/docs/examples/toggle-group-example.tsx
+++ b/components/docs/examples/toggle-group-example.tsx
@@ -43,7 +43,7 @@ export const ToggleGroupExampleScene = (p: ToggleGroupExampleProps = {}) => {
<div style={{ position: "relative", width: "100%", height: "100%" }}>
{/* ToggleGroup renders position:absolute;inset:0 — it centers itself. */}
<ToggleGroup style={toggleStyle} mode={p.mode ?? "light"} />
- <Cursor style={cursorStyle} variant="pointer" mode={p.mode ?? "light"} />
+ <Cursor style={cursorStyle} variant="pointer" />
</div>
);
};
diff --git a/registry/remocn-ui/accordion/__tests__/accordion.test.ts b/registry/remocn-ui/accordion/__tests__/accordion.test.ts
index b87c474f..20d2eb29 100644
--- a/registry/remocn-ui/accordion/__tests__/accordion.test.ts
+++ b/registry/remocn-ui/accordion/__tests__/accordion.test.ts
@@ -16,7 +16,6 @@ type SnippetValues = {
title?: string;
content?: string;
variant?: string;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
@@ -129,7 +128,6 @@ describe("accordionConfig.snippet: default props are omitted", () => {
title: "Is it accessible?",
content: "Yes. It adheres to the WAI-ARIA design pattern.",
variant: "default",
- mode: "light",
});
it("omits title when it equals the default 'Is it accessible?'", () => {
@@ -144,9 +142,6 @@ describe("accordionConfig.snippet: default props are omitted", () => {
expect(allDefaults).not.toContain("variant=");
});
- it("omits mode when it equals the default 'light'", () => {
- expect(allDefaults).not.toContain("mode=");
- });
});
describe("accordionConfig.snippet: non-default props are emitted", () => {
@@ -164,11 +159,6 @@ describe("accordionConfig.snippet: non-default props are emitted", () => {
expect(snippet({ state: "opened", variant: "ghost" }))
.toContain('variant="ghost"');
});
-
- it("emits a non-default mode", () => {
- expect(snippet({ state: "opened", mode: "dark" }))
- .toContain('mode="dark"');
- });
});
describe("accordionConfig.snippet: structural round-trip", () => {
diff --git a/registry/remocn-ui/accordion/config.ts b/registry/remocn-ui/accordion/config.ts
index ae8a60a7..44dbf75f 100644
--- a/registry/remocn-ui/accordion/config.ts
+++ b/registry/remocn-ui/accordion/config.ts
@@ -23,23 +23,17 @@ export const accordionConfig: ComponentConfig = {
options: ["opened", "closed"],
label: "State",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as AccordionState) ?? "opened";
const title = values.title as string | undefined;
const content = values.content as string | undefined;
const variant = values.variant as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [` state="${state}"`];
if (title !== undefined && title !== "Is it accessible?")
@@ -51,8 +45,6 @@ export const accordionConfig: ComponentConfig = {
props.push(` content="${content}"`);
if (variant !== undefined && variant !== "default")
props.push(` variant="${variant}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
return `import { Accordion } from "@/components/remocn/accordion";
diff --git a/registry/remocn-ui/accordion/index.tsx b/registry/remocn-ui/accordion/index.tsx
index ca12531a..4bf4095d 100644
--- a/registry/remocn-ui/accordion/index.tsx
+++ b/registry/remocn-ui/accordion/index.tsx
@@ -14,7 +14,6 @@ export interface AccordionProps {
contentHeight?: number;
variant?: AccordionVariant;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -107,10 +106,9 @@ export function Accordion({
contentHeight = 64,
variant = "default",
theme: themeOverride,
- mode,
className,
}: AccordionProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const ctx = accordionStyleContext(variant, theme);
const v = style ?? accordionStyle(state, ctx);
@@ -123,7 +121,7 @@ export function Accordion({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
fontFamily:
"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
}}
diff --git a/registry/remocn-ui/ai-prompt-flow/index.tsx b/registry/remocn-ui/ai-prompt-flow/index.tsx
index 4f5a48e8..368dc13b 100644
--- a/registry/remocn-ui/ai-prompt-flow/index.tsx
+++ b/registry/remocn-ui/ai-prompt-flow/index.tsx
@@ -147,7 +147,6 @@ export function AiPromptFlow({
>
<Skeleton
style={skeletonStyle}
- mode={mode}
theme={theme}
placeholder={
<div
@@ -196,7 +195,6 @@ export function AiPromptFlow({
title={toastTitle}
variant="success"
style={toastStyle}
- mode={mode}
theme={theme}
/>
</div>
diff --git a/registry/remocn-ui/checkbox/__tests__/checkbox.test.ts b/registry/remocn-ui/checkbox/__tests__/checkbox.test.ts
index d046b4a1..88b119b2 100644
--- a/registry/remocn-ui/checkbox/__tests__/checkbox.test.ts
+++ b/registry/remocn-ui/checkbox/__tests__/checkbox.test.ts
@@ -15,7 +15,6 @@ type SnippetValues = {
state?: string;
label?: string;
size?: string;
- mode?: string;
primary?: string;
};
@@ -110,7 +109,6 @@ describe("checkboxConfig.snippet: default props are omitted", () => {
state: "checked",
label: "",
size: "default",
- mode: "light",
primary: "#171717",
});
@@ -122,10 +120,6 @@ describe("checkboxConfig.snippet: default props are omitted", () => {
expect(allDefaults).not.toContain("size=");
});
- it("omits mode when it equals the default 'light'", () => {
- expect(allDefaults).not.toContain("mode=");
- });
-
it("omits primary when it equals the default '#171717'", () => {
expect(allDefaults).not.toContain("primary=");
});
@@ -140,10 +134,6 @@ describe("checkboxConfig.snippet: non-default props are emitted", () => {
expect(snippet({ state: "checked", size: "lg" })).toContain('size="lg"');
});
- it("emits a non-default mode", () => {
- expect(snippet({ state: "checked", mode: "dark" })).toContain('mode="dark"');
- });
-
it("emits a non-default primary color", () => {
expect(snippet({ state: "checked", primary: "#6366f1" })).toContain('primary="#6366f1"');
});
diff --git a/registry/remocn-ui/checkbox/config.ts b/registry/remocn-ui/checkbox/config.ts
index 4003a07e..62c9809c 100644
--- a/registry/remocn-ui/checkbox/config.ts
+++ b/registry/remocn-ui/checkbox/config.ts
@@ -18,23 +18,17 @@ export const checkboxConfig: ComponentConfig = {
options: ["unchecked", "checked"],
label: "State",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
primary: { type: "color", default: "#171717", label: "Primary" },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as CheckboxState) ?? "checked";
const label = values.label as string | undefined;
const size = values.size as string | undefined;
- const mode = values.mode as string | undefined;
const primary = values.primary as string | undefined;
const props: string[] = [` state="${state}"`];
@@ -42,8 +36,6 @@ export const checkboxConfig: ComponentConfig = {
props.push(` label="${label}"`);
if (size !== undefined && size !== "default")
props.push(` size="${size}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
if (primary !== undefined && primary !== "#171717")
props.push(` primary="${primary}"`);
diff --git a/registry/remocn-ui/checkbox/index.tsx b/registry/remocn-ui/checkbox/index.tsx
index f8244883..00a09807 100644
--- a/registry/remocn-ui/checkbox/index.tsx
+++ b/registry/remocn-ui/checkbox/index.tsx
@@ -13,7 +13,6 @@ export interface CheckboxProps {
size?: CheckboxSize;
theme?: Partial<RemocnTheme>;
primary?: string;
- mode?: "light" | "dark";
align?: "start" | "center" | "end";
className?: string;
}
@@ -94,13 +93,12 @@ export function Checkbox({
size = "default",
theme: themeOverride,
primary,
- mode,
align = "center",
className,
}: CheckboxProps) {
const theme = useRemocnTheme(
{ ...themeOverride, ...(primary ? { primary } : {}) },
- mode,
+ "light",
);
const sizeStyle = SIZE_STYLES[size];
@@ -116,7 +114,7 @@ export function Checkbox({
display: "flex",
alignItems: "center",
justifyContent: justify(align),
- background: theme.background,
+ background: "transparent",
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.tsx
index 87eb2d9a..1e87aa74 100644
--- a/registry/remocn-ui/checkout-flow/index.tsx
+++ b/registry/remocn-ui/checkout-flow/index.tsx
@@ -235,7 +235,6 @@ export function CheckoutFlow({
label={termsLabel}
style={checkboxStyle}
align="start"
- mode={mode}
theme={theme}
/>
</FieldControl>
@@ -262,12 +261,11 @@ export function CheckoutFlow({
title={toastTitle}
variant="success"
style={toastStyle}
- mode={mode}
theme={theme}
/>
</div>
- <Cursor style={cursorStyle} variant="pointer" mode={mode} theme={theme} />
+ <Cursor style={cursorStyle} variant="pointer" theme={theme} />
</div>
);
}
diff --git a/registry/remocn-ui/cursor/__tests__/cursor.test.ts b/registry/remocn-ui/cursor/__tests__/cursor.test.ts
index 82d1da4b..a440c11d 100644
--- a/registry/remocn-ui/cursor/__tests__/cursor.test.ts
+++ b/registry/remocn-ui/cursor/__tests__/cursor.test.ts
@@ -18,7 +18,6 @@ function pathAt(waypoints: CursorWaypoint[], raw: number, speed = 1) {
type SnippetValues = {
variant?: string;
size?: number;
- mode?: string;
rippleColor?: string;
};
@@ -528,22 +527,6 @@ describe("cursorConfig.controls: size", () => {
});
});
-describe("cursorConfig.controls: mode", () => {
- it("mode is a select control", () => {
- expect(cursorConfig.controls.mode.type).toBe("select");
- });
-
- it("mode options are ['light', 'dark']", () => {
- const ctrl = cursorConfig.controls.mode;
- if (ctrl.type !== "select") throw new Error("expected select");
- expect(ctrl.options).toEqual(["light", "dark"]);
- });
-
- it("mode default is 'light'", () => {
- expect(cursorConfig.controls.mode.default).toBe("light");
- });
-});
-
describe("cursorConfig.controls: rippleColor", () => {
it("rippleColor is a color control", () => {
expect(cursorConfig.controls.rippleColor.type).toBe("color");
@@ -584,7 +567,7 @@ describe("cursorConfig.snippet: structural invariants", () => {
});
describe("cursorConfig.snippet: default props are omitted", () => {
- const allDefaults = snippet({ variant: "arrow", size: 28, mode: "light" });
+ const allDefaults = snippet({ variant: "arrow", size: 28 });
it("omits variant when it equals 'arrow'", () => {
expect(allDefaults).not.toContain("variant=");
@@ -593,10 +576,6 @@ describe("cursorConfig.snippet: default props are omitted", () => {
it("omits size when it equals 28", () => {
expect(allDefaults).not.toContain("size=");
});
-
- it("omits mode when it equals 'light'", () => {
- expect(allDefaults).not.toContain("mode=");
- });
});
describe("cursorConfig.snippet: non-default props are emitted", () => {
@@ -608,10 +587,6 @@ describe("cursorConfig.snippet: non-default props are emitted", () => {
expect(snippet({ size: 32 })).toContain("size={32}");
});
- it("emits mode='dark' when non-default", () => {
- expect(snippet({ mode: "dark" })).toContain('mode="dark"');
- });
-
it("does NOT emit variant for the default 'arrow' even when explicitly passed", () => {
expect(snippet({ variant: "arrow" })).not.toContain("variant=");
});
@@ -621,6 +596,6 @@ describe("cursorConfig.snippet: snippet always includes style={style} prop", ()
it("includes style={style} in every variant", () => {
expect(snippet({})).toContain("style={style}");
expect(snippet({ variant: "pointer" })).toContain("style={style}");
- expect(snippet({ mode: "dark", size: 40 })).toContain("style={style}");
+ expect(snippet({ size: 40 })).toContain("style={style}");
});
});
diff --git a/registry/remocn-ui/cursor/config.ts b/registry/remocn-ui/cursor/config.ts
index 64ac6fc1..cb158c3d 100644
--- a/registry/remocn-ui/cursor/config.ts
+++ b/registry/remocn-ui/cursor/config.ts
@@ -11,28 +11,21 @@ export const cursorConfig: ComponentConfig = {
label: "Variant",
},
size: { type: "number", default: 28, min: 16, max: 64, step: 2, label: "Size" },
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
rippleColor: { type: "color", default: "#171717", label: "Ripple" },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const variant = values.variant as string | undefined;
const size = values.size as number | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [" style={style}"];
if (variant !== undefined && variant !== "arrow")
props.push(` variant="${variant}"`);
if (size !== undefined && size !== 28) props.push(` size={${size}}`);
- if (mode !== undefined && mode !== "light") props.push(` mode="${mode}"`);
return `import { Cursor } from "@/components/remocn/cursor";
import { useCursorPath } from "@/components/remocn/use-cursor-path";
diff --git a/registry/remocn-ui/cursor/index.tsx b/registry/remocn-ui/cursor/index.tsx
index e4b47c01..dfcc13d7 100644
--- a/registry/remocn-ui/cursor/index.tsx
+++ b/registry/remocn-ui/cursor/index.tsx
@@ -18,7 +18,6 @@ export interface CursorProps {
variant?: CursorVariant;
size?: number;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
rippleColor?: string;
className?: string;
}
@@ -47,11 +46,10 @@ export function Cursor({
variant = "arrow",
size = 28,
theme: themeOverride,
- mode,
rippleColor,
className,
}: CursorProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const v = style ?? REST;
const press = v.pressScale ?? 1;
diff --git a/registry/remocn-ui/cursor/preview.tsx b/registry/remocn-ui/cursor/preview.tsx
index f55caa20..c0ec8a3e 100644
--- a/registry/remocn-ui/cursor/preview.tsx
+++ b/registry/remocn-ui/cursor/preview.tsx
@@ -7,7 +7,6 @@ export interface CursorPreviewProps {
variant?: CursorVariant;
size?: number;
rippleColor?: string;
- mode?: "light" | "dark";
speed?: number;
}
@@ -15,7 +14,6 @@ export function CursorPreview({
variant = "arrow",
size = 28,
rippleColor,
- mode,
speed = 1,
}: CursorPreviewProps) {
const style = useCursorPath(
@@ -33,7 +31,7 @@ export function CursorPreview({
style={{
position: "absolute",
inset: 0,
- background: mode === "dark" ? "#0a0a0a" : "#ffffff",
+ background: "transparent",
}}
>
<Cursor
@@ -41,7 +39,6 @@ export function CursorPreview({
variant={variant}
size={size}
rippleColor={rippleColor}
- mode={mode}
/>
</div>
);
diff --git a/registry/remocn-ui/input/__tests__/input.test.ts b/registry/remocn-ui/input/__tests__/input.test.ts
index f77a5b4d..6e597f50 100644
--- a/registry/remocn-ui/input/__tests__/input.test.ts
+++ b/registry/remocn-ui/input/__tests__/input.test.ts
@@ -19,7 +19,6 @@ type SnippetValues = {
placeholder?: string;
value?: string;
size?: string;
- mode?: string;
primary?: string;
};
@@ -145,7 +144,6 @@ describe("inputConfig.snippet: default props are omitted", () => {
placeholder: "[email protected]",
size: "default",
- mode: "light",
primary: "#171717",
});
@@ -161,10 +159,6 @@ describe("inputConfig.snippet: default props are omitted", () => {
expect(allDefaults).not.toContain("size=");
});
- it("omits mode when it equals the default 'light'", () => {
- expect(allDefaults).not.toContain("mode=");
- });
-
it("omits primary when it equals the default '#171717'", () => {
expect(allDefaults).not.toContain("primary=");
});
@@ -183,10 +177,6 @@ describe("inputConfig.snippet: non-default props are emitted", () => {
expect(snippet({ state: "typing", size: "lg" })).toContain('size="lg"');
});
- it("emits a non-default mode", () => {
- expect(snippet({ state: "typing", mode: "dark" })).toContain('mode="dark"');
- });
-
it("emits a non-default primary color", () => {
expect(snippet({ state: "typing", primary: "#6366f1" })).toContain('primary="#6366f1"');
});
diff --git a/registry/remocn-ui/input/config.ts b/registry/remocn-ui/input/config.ts
index 76add96f..52ba085e 100644
--- a/registry/remocn-ui/input/config.ts
+++ b/registry/remocn-ui/input/config.ts
@@ -23,24 +23,18 @@ export const inputConfig: ComponentConfig = {
options: ["idle", "hover", "active", "typing", "blur", "invalid"],
label: "State",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
primary: { type: "color", default: "#171717", label: "Primary" },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as InputState) ?? "typing";
const placeholder = values.placeholder as string | undefined;
const value = values.value as string | undefined;
const size = values.size as string | undefined;
- const mode = values.mode as string | undefined;
const primary = values.primary as string | undefined;
const props: string[] = [` state="${state}"`];
@@ -50,8 +44,6 @@ export const inputConfig: ComponentConfig = {
props.push(` value="${value}"`);
if (size !== undefined && size !== "default")
props.push(` size="${size}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
if (primary !== undefined && primary !== "#171717")
props.push(` primary="${primary}"`);
diff --git a/registry/remocn-ui/input/index.tsx b/registry/remocn-ui/input/index.tsx
index eccc5235..d0c33e5d 100644
--- a/registry/remocn-ui/input/index.tsx
+++ b/registry/remocn-ui/input/index.tsx
@@ -26,7 +26,6 @@ export interface InputProps {
size?: InputSize;
theme?: Partial<RemocnTheme>;
primary?: string;
- mode?: "light" | "dark";
fullWidth?: boolean;
className?: string;
}
@@ -156,13 +155,12 @@ export function Input({
size = "default",
theme: themeOverride,
primary,
- mode,
fullWidth = false,
className,
}: InputProps) {
const theme = useRemocnTheme(
{ ...themeOverride, ...(primary ? { primary } : {}) },
- mode,
+ "light",
);
const sizeStyle = SIZE_STYLES[size];
@@ -178,7 +176,7 @@ export function Input({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
fontFamily:
"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
}}
diff --git a/registry/remocn-ui/onboarding-stepper-flow/index.tsx b/registry/remocn-ui/onboarding-stepper-flow/index.tsx
index 40b11854..3f05eae1 100644
--- a/registry/remocn-ui/onboarding-stepper-flow/index.tsx
+++ b/registry/remocn-ui/onboarding-stepper-flow/index.tsx
@@ -87,7 +87,7 @@ export function OnboardingStepperFlow({
<div
style={{ position: "absolute", left: 0, right: 0, top: 96, height: 100 }}
>
- <Stepper style={stepperStyle} steps={steps} mode={mode} theme={theme} />
+ <Stepper style={stepperStyle} steps={steps} theme={theme} />
</div>
{}
@@ -116,7 +116,6 @@ export function OnboardingStepperFlow({
<Radio
style={planStyle}
label={plans[1] ?? "Pro"}
- mode={mode}
theme={theme}
/>
</div>
diff --git a/registry/remocn-ui/radio/__tests__/radio.test.ts b/registry/remocn-ui/radio/__tests__/radio.test.ts
index d0e47702..55193527 100644
--- a/registry/remocn-ui/radio/__tests__/radio.test.ts
+++ b/registry/remocn-ui/radio/__tests__/radio.test.ts
@@ -15,7 +15,6 @@ type SnippetValues = {
state?: string;
label?: string;
size?: string;
- mode?: string;
primary?: string;
};
@@ -110,7 +109,6 @@ describe("radioConfig.snippet: default props are omitted", () => {
state: "checked",
label: "",
size: "default",
- mode: "light",
primary: "#171717",
});
@@ -122,10 +120,6 @@ describe("radioConfig.snippet: default props are omitted", () => {
expect(allDefaults).not.toContain("size=");
});
- it("omits mode when it equals the default 'light'", () => {
- expect(allDefaults).not.toContain("mode=");
- });
-
it("omits primary when it equals the default '#171717'", () => {
expect(allDefaults).not.toContain("primary=");
});
@@ -140,10 +134,6 @@ describe("radioConfig.snippet: non-default props are emitted", () => {
expect(snippet({ state: "checked", size: "lg" })).toContain('size="lg"');
});
- it("emits a non-default mode", () => {
- expect(snippet({ state: "checked", mode: "dark" })).toContain('mode="dark"');
- });
-
it("emits a non-default primary color", () => {
expect(snippet({ state: "checked", primary: "#6366f1" })).toContain('primary="#6366f1"');
});
diff --git a/registry/remocn-ui/radio/config.ts b/registry/remocn-ui/radio/config.ts
index 7f73d6bc..5f8e6295 100644
--- a/registry/remocn-ui/radio/config.ts
+++ b/registry/remocn-ui/radio/config.ts
@@ -18,23 +18,17 @@ export const radioConfig: ComponentConfig = {
options: ["unchecked", "checked"],
label: "State",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
primary: { type: "color", default: "#171717", label: "Primary" },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as RadioState) ?? "checked";
const label = values.label as string | undefined;
const size = values.size as string | undefined;
- const mode = values.mode as string | undefined;
const primary = values.primary as string | undefined;
const props: string[] = [` state="${state}"`];
@@ -42,8 +36,6 @@ export const radioConfig: ComponentConfig = {
props.push(` label="${label}"`);
if (size !== undefined && size !== "default")
props.push(` size="${size}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
if (primary !== undefined && primary !== "#171717")
props.push(` primary="${primary}"`);
diff --git a/registry/remocn-ui/radio/index.tsx b/registry/remocn-ui/radio/index.tsx
index 27f8a7f0..9eed1a07 100644
--- a/registry/remocn-ui/radio/index.tsx
+++ b/registry/remocn-ui/radio/index.tsx
@@ -13,7 +13,6 @@ export interface RadioProps {
size?: RadioSize;
theme?: Partial<RemocnTheme>;
primary?: string;
- mode?: "light" | "dark";
className?: string;
}
@@ -73,12 +72,11 @@ export function Radio({
size = "default",
theme: themeOverride,
primary,
- mode,
className,
}: RadioProps) {
const theme = useRemocnTheme(
{ ...themeOverride, ...(primary ? { primary } : {}) },
- mode,
+ "light",
);
const sizeStyle = SIZE_STYLES[size];
@@ -94,7 +92,7 @@ export function Radio({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
fontFamily:
"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
}}
diff --git a/registry/remocn-ui/settings-toggle-flow/index.tsx b/registry/remocn-ui/settings-toggle-flow/index.tsx
index 5c6916d9..a7d4e256 100644
--- a/registry/remocn-ui/settings-toggle-flow/index.tsx
+++ b/registry/remocn-ui/settings-toggle-flow/index.tsx
@@ -312,7 +312,7 @@ export function SettingsToggleFlow({
...reveal(enterVolume),
}}
>
- <Slider style={sliderStyle} width={SLIDER_W} mode={mode} theme={theme} />
+ <Slider style={sliderStyle} width={SLIDER_W} theme={theme} />
</div>
{}
@@ -370,12 +370,11 @@ export function SettingsToggleFlow({
style={toastStyle}
title={toastTitle}
variant="success"
- mode={mode}
theme={theme}
/>
</div>
- <Cursor style={cursorStyle} variant="pointer" mode={mode} theme={theme} />
+ <Cursor style={cursorStyle} variant="pointer" theme={theme} />
</div>
);
}
diff --git a/registry/remocn-ui/signup-flow/index.tsx b/registry/remocn-ui/signup-flow/index.tsx
index c1f83340..7bd3fa6f 100644
--- a/registry/remocn-ui/signup-flow/index.tsx
+++ b/registry/remocn-ui/signup-flow/index.tsx
@@ -296,12 +296,11 @@ export function SignupFlow({
title={toastTitle}
variant="success"
style={toastStyle}
- mode={mode}
theme={theme}
/>
</div>
- <Cursor style={cursorStyle} variant="pointer" mode={mode} theme={theme} />
+ <Cursor style={cursorStyle} variant="pointer" theme={theme} />
</div>
);
}
diff --git a/registry/remocn-ui/skeleton/__tests__/skeleton.test.ts b/registry/remocn-ui/skeleton/__tests__/skeleton.test.ts
index 3fa10be5..fbed18b1 100644
--- a/registry/remocn-ui/skeleton/__tests__/skeleton.test.ts
+++ b/registry/remocn-ui/skeleton/__tests__/skeleton.test.ts
@@ -19,7 +19,6 @@ const VALID_LAYOUTS: readonly SkeletonLayout[] = ["lines", "card"];
type SnippetValues = {
state?: string;
layout?: string;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
skeletonConfig.snippet(values as Record<string, unknown>);
@@ -409,22 +408,6 @@ describe("skeletonConfig.controls: layout", () => {
});
});
-describe("skeletonConfig.controls: mode", () => {
- it("mode is a select control", () => {
- expect(skeletonConfig.controls.mode.type).toBe("select");
- });
-
- it("mode options are ['light', 'dark']", () => {
- const ctrl = skeletonConfig.controls.mode;
- if (ctrl.type !== "select") throw new Error("expected select");
- expect(ctrl.options).toEqual(["light", "dark"]);
- });
-
- it("mode default is 'light'", () => {
- expect(skeletonConfig.controls.mode.default).toBe("light");
- });
-});
-
describe("skeletonConfig.snippet: import line", () => {
it("includes 'import { Skeleton }' from the correct path", () => {
const out = snippet({ state: "loading" });
@@ -458,10 +441,6 @@ describe("skeletonConfig.snippet: default props are omitted", () => {
expect(out).not.toContain("layout=");
});
- it("omits mode when it equals the default 'light'", () => {
- const out = snippet({ state: "loading", mode: "light" });
- expect(out).not.toContain("mode=");
- });
});
describe("skeletonConfig.snippet: non-default props are emitted", () => {
@@ -470,12 +449,6 @@ describe("skeletonConfig.snippet: non-default props are emitted", () => {
'layout="card"',
);
});
-
- it("emits mode='dark' when non-default", () => {
- expect(snippet({ state: "loading", mode: "dark" })).toContain(
- 'mode="dark"',
- );
- });
});
describe("skeletonConfig.snippet: state options round-trip", () => {
diff --git a/registry/remocn-ui/skeleton/config.ts b/registry/remocn-ui/skeleton/config.ts
index 0294a405..058f3dce 100644
--- a/registry/remocn-ui/skeleton/config.ts
+++ b/registry/remocn-ui/skeleton/config.ts
@@ -17,27 +17,19 @@ export const skeletonConfig: ComponentConfig = {
options: ["loading", "loaded"],
label: "State",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as SkeletonState) ?? "loading";
const layout = values.layout as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [` state="${state}"`];
if (layout !== undefined && layout !== "lines")
props.push(` layout="${layout}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
return `import { Skeleton } from "@/components/remocn/skeleton";
diff --git a/registry/remocn-ui/skeleton/index.tsx b/registry/remocn-ui/skeleton/index.tsx
index e7728093..7bf805e2 100644
--- a/registry/remocn-ui/skeleton/index.tsx
+++ b/registry/remocn-ui/skeleton/index.tsx
@@ -16,7 +16,6 @@ export interface SkeletonProps {
layout?: SkeletonLayout;
speed?: number;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -79,10 +78,9 @@ export function Skeleton({
layout = "lines",
speed,
theme: themeOverride,
- mode,
className,
}: SkeletonProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const v = style ?? skeletonStyle(state);
const placeholderLayer = placeholder ?? (
diff --git a/registry/remocn-ui/skeleton/preview.tsx b/registry/remocn-ui/skeleton/preview.tsx
index df025ff7..a05f8f3f 100644
--- a/registry/remocn-ui/skeleton/preview.tsx
+++ b/registry/remocn-ui/skeleton/preview.tsx
@@ -10,7 +10,6 @@ import {
export interface SkeletonPreviewProps {
layout?: SkeletonLayout;
state?: SkeletonState;
- mode?: "light" | "dark";
speed?: number;
}
@@ -73,10 +72,9 @@ function DemoContent({
export function SkeletonPreview({
layout = "card",
state = "loading",
- mode,
speed,
}: SkeletonPreviewProps) {
- const theme = useRemocnTheme(undefined, mode);
+ const theme = useRemocnTheme(undefined, "light");
return (
<div
@@ -86,10 +84,10 @@ export function SkeletonPreview({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
}}
>
- <Skeleton layout={layout} state={state} mode={mode} speed={speed}>
+ <Skeleton layout={layout} state={state} speed={speed}>
<DemoContent layout={layout} theme={theme} />
</Skeleton>
</div>
diff --git a/registry/remocn-ui/slider/__tests__/slider.test.ts b/registry/remocn-ui/slider/__tests__/slider.test.ts
index a81ba370..f19f6d07 100644
--- a/registry/remocn-ui/slider/__tests__/slider.test.ts
+++ b/registry/remocn-ui/slider/__tests__/slider.test.ts
@@ -21,7 +21,6 @@ type SnippetValues = {
thumbState?: string;
width?: number;
showValue?: boolean;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
sliderConfig.snippet(values as Record<string, unknown>);
@@ -448,15 +447,6 @@ describe("sliderConfig.controls: showValue", () => {
});
});
-describe("sliderConfig.controls: mode", () => {
- it("mode is a select with options ['light','dark'] and default 'light'", () => {
- const ctrl = sliderConfig.controls.mode;
- if (ctrl.type !== "select") throw new Error("expected select");
- expect(ctrl.options).toEqual(["light", "dark"]);
- expect(ctrl.default).toBe("light");
- });
-});
-
describe("sliderConfig.snippet: import line", () => {
it("includes 'import { Slider }' from the correct path", () => {
const out = snippet({ value: 40 });
@@ -490,10 +480,6 @@ describe("sliderConfig.snippet: default props are omitted", () => {
const out = snippet({ value: 40, width: 320 });
expect(out).not.toContain("width=");
});
- it("omits mode when it equals the default 'light'", () => {
- const out = snippet({ value: 40, mode: "light" });
- expect(out).not.toContain("mode=");
- });
it("omits showValue when it is false", () => {
const out = snippet({ value: 40, showValue: false });
expect(out).not.toContain("showValue");
@@ -513,9 +499,6 @@ describe("sliderConfig.snippet: non-default props are emitted", () => {
it("emits width={480} when non-default", () => {
expect(snippet({ value: 40, width: 480 })).toContain("width={480}");
});
- it("emits mode='dark' when non-default", () => {
- expect(snippet({ value: 40, mode: "dark" })).toContain('mode="dark"');
- });
it("emits showValue (boolean shorthand) when true", () => {
const out = snippet({ value: 40, showValue: true });
expect(out).toContain("showValue");
diff --git a/registry/remocn-ui/slider/config.ts b/registry/remocn-ui/slider/config.ts
index 5adcf109..a698cd8b 100644
--- a/registry/remocn-ui/slider/config.ts
+++ b/registry/remocn-ui/slider/config.ts
@@ -21,30 +21,23 @@ export const sliderConfig: ComponentConfig = {
label: "Width",
},
showValue: { type: "boolean", default: true, label: "Show Value" },
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const value = values.value as number | undefined;
const thumbState = values.thumbState as SliderThumbState | undefined;
const width = values.width as number | undefined;
const showValue = values.showValue as boolean | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [` value={${value ?? 0}}`];
if (thumbState !== undefined && thumbState !== "idle")
props.push(` thumbState="${thumbState}"`);
if (width !== undefined && width !== 320) props.push(` width={${width}}`);
if (showValue) props.push(` showValue`);
- if (mode !== undefined && mode !== "light") props.push(` mode="${mode}"`);
return `import { Slider } from "@/components/remocn/slider";
diff --git a/registry/remocn-ui/slider/index.tsx b/registry/remocn-ui/slider/index.tsx
index adab91d6..889660c1 100644
--- a/registry/remocn-ui/slider/index.tsx
+++ b/registry/remocn-ui/slider/index.tsx
@@ -17,7 +17,6 @@ export interface SliderProps {
width?: number;
showValue?: boolean;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -72,10 +71,9 @@ export function Slider({
width = 320,
showValue = false,
theme: themeOverride,
- mode,
className,
}: SliderProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const ctx = sliderStyleContext(theme);
const thumb = sliderThumbStyle(thumbState);
diff --git a/registry/remocn-ui/slider/preview.tsx b/registry/remocn-ui/slider/preview.tsx
index e5edc342..362b0252 100644
--- a/registry/remocn-ui/slider/preview.tsx
+++ b/registry/remocn-ui/slider/preview.tsx
@@ -1,6 +1,5 @@
"use client";
-import { useRemocnTheme } from "@/lib/remocn-ui";
import { Slider, type SliderThumbState } from "@/registry/remocn-ui/slider";
export interface SliderPreviewProps {
@@ -8,7 +7,6 @@ export interface SliderPreviewProps {
thumbState?: SliderThumbState;
width?: number;
showValue?: boolean;
- mode?: "light" | "dark";
}
export function SliderPreview({
@@ -16,10 +14,7 @@ export function SliderPreview({
thumbState = "idle",
width = 320,
showValue = true,
- mode,
}: SliderPreviewProps) {
- const theme = useRemocnTheme(undefined, mode);
-
return (
<div
style={{
@@ -28,7 +23,7 @@ export function SliderPreview({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
}}
>
<Slider
@@ -36,7 +31,6 @@ export function SliderPreview({
thumbState={thumbState}
width={width}
showValue={showValue}
- mode={mode}
/>
</div>
);
diff --git a/registry/remocn-ui/stepper/__tests__/stepper.test.ts b/registry/remocn-ui/stepper/__tests__/stepper.test.ts
index 90743d23..43cac555 100644
--- a/registry/remocn-ui/stepper/__tests__/stepper.test.ts
+++ b/registry/remocn-ui/stepper/__tests__/stepper.test.ts
@@ -17,7 +17,6 @@ import { defaultLightTheme, easings } from "@/lib/remocn-ui";
type SnippetValues = {
activeIndex?: number;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
stepperConfig.snippet(values as Record<string, unknown>);
@@ -430,22 +429,6 @@ describe("stepperConfig.controls.activeIndex", () => {
});
});
-describe("stepperConfig.controls.mode", () => {
- it("is a select control", () => {
- expect(stepperConfig.controls.mode.type).toBe("select");
- });
-
- it("options are ['light', 'dark']", () => {
- const ctrl = stepperConfig.controls.mode;
- if (ctrl.type !== "select") throw new Error("expected select");
- expect(ctrl.options).toEqual(["light", "dark"]);
- });
-
- it("defaults to 'light'", () => {
- expect(stepperConfig.controls.mode.default).toBe("light");
- });
-});
-
describe("stepperConfig.snippet: import line", () => {
it("includes 'import { Stepper }' from the correct path", () => {
const out = snippet({ activeIndex: 1 });
@@ -503,22 +486,6 @@ describe("stepperConfig.snippet: steps inline literal always emitted", () => {
});
});
-describe("stepperConfig.snippet: default mode is omitted", () => {
- it("omits mode when it equals the default 'light'", () => {
- expect(snippet({ activeIndex: 1, mode: "light" })).not.toContain("mode=");
- });
-
- it("omits mode when not provided", () => {
- expect(snippet({ activeIndex: 1 })).not.toContain("mode=");
- });
-});
-
-describe("stepperConfig.snippet: non-default mode is emitted", () => {
- it("emits mode=\"dark\" when non-default", () => {
- expect(snippet({ activeIndex: 1, mode: "dark" })).toContain('mode="dark"');
- });
-});
-
describe("stepperConfig.snippet: activeIndex numeric round-trip", () => {
it("emits the correct activeIndex for 0, 1, 2", () => {
for (const i of [0, 1, 2]) {
diff --git a/registry/remocn-ui/stepper/config.ts b/registry/remocn-ui/stepper/config.ts
index 4afaa210..18deaa9e 100644
--- a/registry/remocn-ui/stepper/config.ts
+++ b/registry/remocn-ui/stepper/config.ts
@@ -14,23 +14,16 @@ export const stepperConfig: ComponentConfig = {
step: 1,
label: "Active Index",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const activeIndex = values.activeIndex as number | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [` activeIndex={${activeIndex ?? 0}}`];
- if (mode !== undefined && mode !== "light") props.push(` mode="${mode}"`);
const stepsLiteral = JSON.stringify(DEFAULT_STEPS);
return `import { Stepper } from "@/components/remocn/stepper";
diff --git a/registry/remocn-ui/stepper/index.tsx b/registry/remocn-ui/stepper/index.tsx
index c0e4d927..b477adbf 100644
--- a/registry/remocn-ui/stepper/index.tsx
+++ b/registry/remocn-ui/stepper/index.tsx
@@ -14,7 +14,6 @@ export interface StepperProps {
style?: StepperStyle;
orientation?: StepperOrientation;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -68,10 +67,9 @@ export function Stepper({
style,
orientation: _orientation = "horizontal",
theme: themeOverride,
- mode,
className,
}: StepperProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const ctx = stepperStyleContext(theme);
const v = style ?? stepperStyle(activeIndex);
const position = v.position;
@@ -85,7 +83,7 @@ export function Stepper({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
fontFamily:
"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
}}
diff --git a/registry/remocn-ui/stepper/preview.tsx b/registry/remocn-ui/stepper/preview.tsx
index 6f013de0..ca0cbd60 100644
--- a/registry/remocn-ui/stepper/preview.tsx
+++ b/registry/remocn-ui/stepper/preview.tsx
@@ -1,18 +1,14 @@
"use client";
-import { useRemocnTheme } from "@/lib/remocn-ui";
import { Stepper } from "@/registry/remocn-ui/stepper";
export interface StepperPreviewProps {
activeIndex?: number;
- mode?: "light" | "dark";
}
const DEMO_STEPS = ["Account", "Plan", "Done"];
-export function StepperPreview({ activeIndex = 1, mode }: StepperPreviewProps) {
- const theme = useRemocnTheme(undefined, mode);
-
+export function StepperPreview({ activeIndex = 1 }: StepperPreviewProps) {
return (
<div
style={{
@@ -21,10 +17,10 @@ export function StepperPreview({ activeIndex = 1, mode }: StepperPreviewProps) {
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
}}
>
- <Stepper steps={DEMO_STEPS} activeIndex={activeIndex} mode={mode} />
+ <Stepper steps={DEMO_STEPS} activeIndex={activeIndex} />
</div>
);
}
diff --git a/registry/remocn-ui/tabs/__tests__/tabs.test.ts b/registry/remocn-ui/tabs/__tests__/tabs.test.ts
index 45efdd93..851f908f 100644
--- a/registry/remocn-ui/tabs/__tests__/tabs.test.ts
+++ b/registry/remocn-ui/tabs/__tests__/tabs.test.ts
@@ -14,7 +14,6 @@ const VALID_STATES: readonly TabsState[] = ["Account", "Password", "Settings"];
type SnippetValues = {
state?: string;
variant?: string;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
@@ -106,16 +105,11 @@ describe("tabsConfig.snippet: default props are omitted", () => {
const allDefaults = snippet({
state: "Account",
variant: "pill",
- mode: "light",
});
it("omits variant when it equals the default 'pill'", () => {
expect(allDefaults).not.toContain("variant=");
});
-
- it("omits mode when it equals the default 'light'", () => {
- expect(allDefaults).not.toContain("mode=");
- });
});
describe("tabsConfig.snippet: non-default props are emitted", () => {
@@ -123,11 +117,6 @@ describe("tabsConfig.snippet: non-default props are emitted", () => {
expect(snippet({ state: "Account", variant: "underline" }))
.toContain('variant="underline"');
});
-
- it("emits a non-default mode='dark'", () => {
- expect(snippet({ state: "Account", mode: "dark" }))
- .toContain('mode="dark"');
- });
});
describe("tabsConfig.snippet: structural round-trip", () => {
diff --git a/registry/remocn-ui/tabs/config.ts b/registry/remocn-ui/tabs/config.ts
index 411da9ff..ebf73a71 100644
--- a/registry/remocn-ui/tabs/config.ts
+++ b/registry/remocn-ui/tabs/config.ts
@@ -17,27 +17,19 @@ export const tabsConfig: ComponentConfig = {
options: ["pill", "underline"],
label: "Variant",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as TabsState) ?? "Account";
const variant = values.variant as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [` state="${state}"`];
if (variant !== undefined && variant !== "pill")
props.push(` variant="${variant}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
return `import { Tabs } from "@/components/remocn/tabs";
diff --git a/registry/remocn-ui/tabs/index.tsx b/registry/remocn-ui/tabs/index.tsx
index 0b7e0beb..ea6ca9d1 100644
--- a/registry/remocn-ui/tabs/index.tsx
+++ b/registry/remocn-ui/tabs/index.tsx
@@ -14,7 +14,6 @@ export interface TabsProps {
contentHeight?: number;
variant?: TabsVariant;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -75,10 +74,9 @@ export function Tabs({
contentHeight = 72,
variant = "pill",
theme: themeOverride,
- mode,
className,
}: TabsProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const ctx = tabsStyleContext(items, variant, theme);
const v = style ?? tabsStyle(state, ctx);
@@ -99,7 +97,7 @@ export function Tabs({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
fontFamily:
"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
}}
diff --git a/registry/remocn-ui/toast/__tests__/toast.test.ts b/registry/remocn-ui/toast/__tests__/toast.test.ts
index 1a7b2764..b2be84a6 100644
--- a/registry/remocn-ui/toast/__tests__/toast.test.ts
+++ b/registry/remocn-ui/toast/__tests__/toast.test.ts
@@ -22,7 +22,6 @@ type SnippetValues = {
title?: string;
description?: string;
variant?: string;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
toastConfig.snippet(values as Record<string, unknown>);
@@ -437,22 +436,6 @@ describe("toastConfig.controls: variant", () => {
});
});
-describe("toastConfig.controls: mode", () => {
- it("mode is a select control", () => {
- expect(toastConfig.controls.mode.type).toBe("select");
- });
-
- it("mode options are ['light', 'dark']", () => {
- const ctrl = toastConfig.controls.mode;
- if (ctrl.type !== "select") throw new Error("expected select");
- expect(ctrl.options).toEqual(["light", "dark"]);
- });
-
- it("mode default is 'light'", () => {
- expect(toastConfig.controls.mode.default).toBe("light");
- });
-});
-
describe("toastConfig.controls: title and description", () => {
it("title is a text control", () => {
expect(toastConfig.controls.title.type).toBe("text");
@@ -514,11 +497,6 @@ describe("toastConfig.snippet: default props are omitted", () => {
expect(out).not.toContain("variant=");
});
- it("omits mode when it equals the default 'light'", () => {
- const out = snippet({ state: "visible", mode: "light" });
- expect(out).not.toContain("mode=");
- });
-
it("omits description when it equals the default description", () => {
const out = snippet({
state: "visible",
@@ -541,12 +519,6 @@ describe("toastConfig.snippet: non-default props are emitted", () => {
);
});
- it("emits mode='dark' when non-default", () => {
- expect(snippet({ state: "visible", mode: "dark" })).toContain(
- 'mode="dark"',
- );
- });
-
it("emits description when non-default", () => {
expect(
snippet({ state: "visible", description: "File uploaded." }),
diff --git a/registry/remocn-ui/toast/config.ts b/registry/remocn-ui/toast/config.ts
index b3f8f040..67cb58eb 100644
--- a/registry/remocn-ui/toast/config.ts
+++ b/registry/remocn-ui/toast/config.ts
@@ -26,23 +26,17 @@ export const toastConfig: ComponentConfig = {
options: ["hidden", "visible"],
label: "State",
},
- mode: {
- type: "select",
- default: "light",
- options: ["light", "dark"],
- label: "Mode",
- },
},
durationInFrames: 120,
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
snippet: (values) => {
const state = (values.state as ToastState) ?? "visible";
const title = values.title as string | undefined;
const description = values.description as string | undefined;
const variant = values.variant as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [
` state="${state}"`,
@@ -52,8 +46,6 @@ export const toastConfig: ComponentConfig = {
props.push(` description="${description}"`);
if (variant !== undefined && variant !== "default")
props.push(` variant="${variant}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
return `import { Toast } from "@/components/remocn/toast";
diff --git a/registry/remocn-ui/toast/index.tsx b/registry/remocn-ui/toast/index.tsx
index 13377aca..e382eeba 100644
--- a/registry/remocn-ui/toast/index.tsx
+++ b/registry/remocn-ui/toast/index.tsx
@@ -13,7 +13,6 @@ export interface ToastProps {
description?: string;
variant?: ToastVariant;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -98,10 +97,9 @@ export function Toast({
description,
variant = "default",
theme: themeOverride,
- mode,
className,
}: ToastProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const ctx = toastStyleContext(variant, theme);
const v = style ?? toastStyle(state);
diff --git a/registry/remocn-ui/toast/preview.tsx b/registry/remocn-ui/toast/preview.tsx
index e2fc6794..e0be518e 100644
--- a/registry/remocn-ui/toast/preview.tsx
+++ b/registry/remocn-ui/toast/preview.tsx
@@ -1,6 +1,5 @@
"use client";
-import { useRemocnTheme } from "@/lib/remocn-ui";
import {
Toast,
type ToastState,
@@ -12,7 +11,6 @@ export interface ToastPreviewProps {
description?: string;
variant?: ToastVariant;
state?: ToastState;
- mode?: "light" | "dark";
}
export function ToastPreview({
@@ -20,10 +18,7 @@ export function ToastPreview({
description = "Your profile has been updated.",
variant = "success",
state = "visible",
- mode,
}: ToastPreviewProps) {
- const theme = useRemocnTheme(undefined, mode);
-
return (
<div
style={{
@@ -32,7 +27,7 @@ export function ToastPreview({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
}}
>
<Toast
@@ -40,7 +35,6 @@ export function ToastPreview({
description={description}
variant={variant}
state={state}
- mode={mode}
/>
</div>
);
diff --git a/registry/remocn/x-follow-card/index.tsx b/registry/remocn/x-follow-card/index.tsx
index ad183959..8fc05f67 100644
--- a/registry/remocn/x-follow-card/index.tsx
+++ b/registry/remocn/x-follow-card/index.tsx
@@ -669,7 +669,6 @@ function CursorLayer({
>
<Cursor
variant="pointer"
- mode="light"
rippleColor={accent}
style={style}
/>