Skip to content

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

feat: remove bg from remocnui

dev_wandry4ad66c854b2c
diff --git a/components/docs/examples/index.tsx b/components/docs/examples/index.tsx
index 5a8bd3b7..a0e4c4b2 100644
--- a/components/docs/examples/index.tsx
+++ b/components/docs/examples/index.tsx
@@ -1,5 +1,6 @@
import type { ComponentType } from "react";
import { FPS, H, W } from "@/lib/customizer-config";
+import type { BackdropFill } from "@/registry/remocn/backdrop";
import {
AccordionExampleScene,
accordionExampleCode,
@@ -84,6 +85,7 @@ export interface ExampleEntry {
fps: number;
width: number;
height: number;
+ previewBackdrop?: BackdropFill;
}
export const examples: Record<string, ExampleEntry> = {
@@ -163,6 +165,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"input-example": {
Component: InputExampleScene,
@@ -234,6 +237,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"progress-example": {
Component: ProgressExampleScene,
@@ -243,6 +247,7 @@ export const examples: Record<string, ExampleEntry> = {
fps: FPS,
width: W,
height: H,
+ previewBackdrop: { type: "color", value: "oklch(1 0 0)" },
},
"skeleton-example": {
Component: SkeletonExampleScene,
diff --git a/components/docs/examples/progress-example.tsx b/components/docs/examples/progress-example.tsx
index e6373ce5..3fd23148 100644
--- a/components/docs/examples/progress-example.tsx
+++ b/components/docs/examples/progress-example.tsx
@@ -3,11 +3,10 @@
import { Progress } from "@/registry/remocn-ui/progress";
import { useProgressTransition } from "@/registry/remocn-ui/progress/use-progress-transition";
-export const progressExampleControls = ["showLabel", "mode"] as const;
+export const progressExampleControls = ["showLabel"] as const;
export interface ProgressExampleProps {
showLabel?: boolean;
- mode?: "light" | "dark";
}
export const ProgressExampleScene = (p: ProgressExampleProps = {}) => {
@@ -29,7 +28,7 @@ export const ProgressExampleScene = (p: ProgressExampleProps = {}) => {
justifyContent: "center",
}}
>
- <Progress style={progressStyle} showLabel={p.showLabel ?? true} width={320} mode={p.mode ?? "light"} />
+ <Progress style={progressStyle} showLabel={p.showLabel ?? true} width={320} />
</div>
);
};
@@ -38,12 +37,10 @@ export const progressExampleCode = (
values: Record<string, unknown> = {},
): string => {
const showLabel = values.showLabel as boolean | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [];
if (showLabel !== undefined && showLabel !== true)
props.push(`showLabel={${showLabel}}`);
- if (mode !== undefined && mode !== "light") props.push(`mode="${mode}"`);
const propsStr = props.length ? ` ${props.join(" ")}` : "";
return `import { Progress } from "@/components/remocn/progress";
diff --git a/components/docs/examples/switch-example.tsx b/components/docs/examples/switch-example.tsx
index f43eaa37..c27ff283 100644
--- a/components/docs/examples/switch-example.tsx
+++ b/components/docs/examples/switch-example.tsx
@@ -3,26 +3,24 @@
import { Switch } from "@/registry/remocn-ui/switch";
import { useSwitchTransition } from "@/registry/remocn-ui/switch/use-switch-transition";
-export const switchExampleControls = ["label", "size", "primary", "mode"] as const;
+export const switchExampleControls = ["label", "size", "primary"] as const;
export interface SwitchExampleProps {
label?: string;
size?: "sm" | "default" | "lg";
primary?: string;
- mode?: "light" | "dark";
}
export const SwitchExampleScene = (p: SwitchExampleProps = {}) => {
const style = useSwitchTransition([
{ at: 18, state: "checked", duration: 14 },
{ at: 78, state: "unchecked", duration: 12 },
- ], { mode: p.mode, primary: p.primary });
+ ], { primary: p.primary });
return (
<Switch
label={p.label ?? "Enable notifications"}
size={p.size ?? "default"}
primary={p.primary}
- mode={p.mode ?? "light"}
style={style}
/>
);
@@ -34,19 +32,16 @@ export const switchExampleCode = (
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 !== "Enable notifications")
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/tooltip-example.tsx b/components/docs/examples/tooltip-example.tsx
index ef622fe0..359c41b6 100644
--- a/components/docs/examples/tooltip-example.tsx
+++ b/components/docs/examples/tooltip-example.tsx
@@ -15,13 +15,10 @@ const BTN_Y = 360;
const AWAY_X = 200;
const AWAY_Y = 200;
-export const tooltipExampleControls = [
- "label", "mode",
-] as const;
+export const tooltipExampleControls = ["label"] as const;
export interface TooltipExampleProps {
label?: string;
- mode?: "light" | "dark";
}
export const TooltipExampleScene = (p: TooltipExampleProps = {}) => {
@@ -34,22 +31,16 @@ export const TooltipExampleScene = (p: TooltipExampleProps = {}) => {
]);
// Button: idle → hover as cursor arrives, back to idle as cursor leaves.
- const buttonStyle = useButtonTransition(
- [
- { at: 28, state: "hover", duration: 8 },
- { at: 100, state: "idle", duration: 8 },
- ],
- { mode: p.mode },
- );
+ const buttonStyle = useButtonTransition([
+ { at: 28, state: "hover", duration: 8 },
+ { at: 100, state: "idle", duration: 8 },
+ ]);
// Tooltip: fades in shortly after cursor arrives, fades out as cursor leaves.
- const tooltipStyle = useTooltipTransition(
- [
- { at: 36, state: "visible", duration: 8 },
- { at: 100, state: "hidden", duration: 8 },
- ],
- { mode: p.mode },
- );
+ const tooltipStyle = useTooltipTransition([
+ { at: 36, state: "visible", duration: 8 },
+ { at: 100, state: "hidden", duration: 8 },
+ ]);
return (
<div style={{ position: "relative", width: "100%", height: "100%" }}>
@@ -63,7 +54,7 @@ export const TooltipExampleScene = (p: TooltipExampleProps = {}) => {
transform: "translate(-50%, -50%)",
}}
>
- <Button label="Hover me" style={buttonStyle} mode={p.mode ?? "light"} />
+ <Button label="Hover me" style={buttonStyle} mode="light" />
{/* Tooltip is anchored relative to the button: centered above it. */}
<div
@@ -77,7 +68,6 @@ export const TooltipExampleScene = (p: TooltipExampleProps = {}) => {
<Tooltip
label={p.label ?? "Add to library"}
side="top"
- mode={p.mode ?? "light"}
style={tooltipStyle}
/>
</div>
@@ -92,15 +82,8 @@ export const tooltipExampleCode = (
values: Record<string, unknown> = {},
): string => {
const label = values.label as string | undefined;
- const mode = values.mode as string | undefined;
const labelStr = label ?? "Add to library";
- const hookOpts: string[] = [];
- if (mode !== undefined && mode !== "light") hookOpts.push(`mode: "${mode}"`);
- const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : "";
-
- const modeStr =
- mode !== undefined && mode !== "light" ? ` mode="${mode}"` : "";
return `import { Cursor } from "@/components/remocn/cursor";
import { useCursorPath } from "@/components/remocn/use-cursor-path";
@@ -127,7 +110,7 @@ export const Scene = () => {
[
{ at: 28, state: "hover", duration: 8 },
{ at: 100, state: "idle", duration: 8 },
- ]${optsStr},
+ ],
);
// Tooltip fades in shortly after hover, then fades out as cursor leaves.
@@ -135,7 +118,7 @@ export const Scene = () => {
[
{ at: 36, state: "visible", duration: 8 },
{ at: 100, state: "hidden", duration: 8 },
- ]${optsStr},
+ ],
);
return (
@@ -148,7 +131,7 @@ export const Scene = () => {
transform: "translate(-50%, -50%)",
}}
>
- <Button label="Hover me" style={buttonStyle}${modeStr} />
+ <Button label="Hover me" style={buttonStyle} />
{/* Tooltip sits above the button; the caller owns the anchor position. */}
<div
@@ -159,7 +142,7 @@ export const Scene = () => {
transform: "translateX(-50%)",
}}
>
- <Tooltip label="${labelStr}" side="top"${modeStr} style={tooltipStyle} />
+ <Tooltip label="${labelStr}" side="top" style={tooltipStyle} />
</div>
</div>
diff --git a/components/docs/ui-component-preview.tsx b/components/docs/ui-component-preview.tsx
index 4cfbd1eb..bdf885e5 100644
--- a/components/docs/ui-component-preview.tsx
+++ b/components/docs/ui-component-preview.tsx
@@ -297,6 +297,7 @@ function UiPreview({
fps={exampleEntry.fps}
compositionWidth={exampleEntry.width}
compositionHeight={exampleEntry.height}
+ previewBackdrop={exampleEntry.previewBackdrop}
/>
</TabsContent>
diff --git a/registry/remocn-ui/onboarding-stepper-flow/index.tsx b/registry/remocn-ui/onboarding-stepper-flow/index.tsx
index ce10b22f..40b11854 100644
--- a/registry/remocn-ui/onboarding-stepper-flow/index.tsx
+++ b/registry/remocn-ui/onboarding-stepper-flow/index.tsx
@@ -126,7 +126,6 @@ export function OnboardingStepperFlow({
<Switch
style={settingsStyle}
label="Email notifications"
- mode={mode}
theme={theme}
/>
</div>
diff --git a/registry/remocn-ui/progress/__tests__/progress.test.ts b/registry/remocn-ui/progress/__tests__/progress.test.ts
index 9e33e7e4..cc3d417d 100644
--- a/registry/remocn-ui/progress/__tests__/progress.test.ts
+++ b/registry/remocn-ui/progress/__tests__/progress.test.ts
@@ -13,7 +13,6 @@ type SnippetValues = {
value?: number;
width?: number;
showLabel?: boolean;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
progressConfig.snippet(values as Record<string, unknown>);
@@ -296,22 +295,6 @@ describe("progressConfig.controls: showLabel", () => {
});
});
-describe("progressConfig.controls: mode", () => {
- it("mode is a select control", () => {
- expect(progressConfig.controls.mode.type).toBe("select");
- });
-
- it("mode options are ['light', 'dark']", () => {
- const ctrl = progressConfig.controls.mode;
- if (ctrl.type !== "select") throw new Error("expected select");
- expect(ctrl.options).toEqual(["light", "dark"]);
- });
-
- it("mode default is 'light'", () => {
- expect(progressConfig.controls.mode.default).toBe("light");
- });
-});
-
describe("progressConfig.snippet: import line", () => {
it("includes 'import { Progress }' from the correct path", () => {
const out = snippet({ value: 50 });
@@ -359,11 +342,6 @@ describe("progressConfig.snippet: default props are omitted", () => {
expect(out).not.toContain("width=");
});
- it("omits mode when it equals the default 'light'", () => {
- const out = snippet({ value: 50, mode: "light" });
- expect(out).not.toContain("mode=");
- });
-
it("omits showLabel when it is false", () => {
const out = snippet({ value: 50, showLabel: false });
expect(out).not.toContain("showLabel");
@@ -384,10 +362,6 @@ describe("progressConfig.snippet: non-default props are emitted", () => {
expect(snippet({ value: 50, width: 200 })).toContain("width={200}");
});
- it("emits mode='dark' when non-default", () => {
- expect(snippet({ value: 50, mode: "dark" })).toContain('mode="dark"');
- });
-
it("emits showLabel (boolean shorthand) when true", () => {
const out = snippet({ value: 50, showLabel: true });
expect(out).toContain("showLabel");
diff --git a/registry/remocn-ui/progress/config.ts b/registry/remocn-ui/progress/config.ts
index 1b556f6f..b0a670a8 100644
--- a/registry/remocn-ui/progress/config.ts
+++ b/registry/remocn-ui/progress/config.ts
@@ -14,27 +14,20 @@ export const progressConfig: ComponentConfig = {
label: "Width",
},
showLabel: { type: "boolean", default: true, label: "Show Label" },
- 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 width = values.width as number | undefined;
const showLabel = values.showLabel as boolean | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [` value={${value ?? 0}}`];
if (width !== undefined && width !== 320) props.push(` width={${width}}`);
if (showLabel) props.push(` showLabel`);
- if (mode !== undefined && mode !== "light") props.push(` mode="${mode}"`);
return `import { Progress } from "@/components/remocn/progress";
diff --git a/registry/remocn-ui/progress/index.tsx b/registry/remocn-ui/progress/index.tsx
index e1867a81..42787f29 100644
--- a/registry/remocn-ui/progress/index.tsx
+++ b/registry/remocn-ui/progress/index.tsx
@@ -12,7 +12,6 @@ export interface ProgressProps {
width?: number;
showLabel?: boolean;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -28,10 +27,9 @@ export function Progress({
width = 320,
showLabel = false,
theme: themeOverride,
- mode,
className,
}: ProgressProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const v = clampValue(style ? style.value : value);
const track = theme.muted;
diff --git a/registry/remocn-ui/progress/preview.tsx b/registry/remocn-ui/progress/preview.tsx
index 8ba26eda..434d59eb 100644
--- a/registry/remocn-ui/progress/preview.tsx
+++ b/registry/remocn-ui/progress/preview.tsx
@@ -1,23 +1,18 @@
"use client";
-import { useRemocnTheme } from "@/lib/remocn-ui";
import { Progress } from "@/registry/remocn-ui/progress";
export interface ProgressPreviewProps {
value?: number;
width?: number;
showLabel?: boolean;
- mode?: "light" | "dark";
}
export function ProgressPreview({
value = 62,
width = 320,
showLabel = true,
- mode,
}: ProgressPreviewProps) {
- const theme = useRemocnTheme(undefined, mode);
-
return (
<div
style={{
@@ -26,10 +21,10 @@ export function ProgressPreview({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
}}
>
- <Progress value={value} width={width} showLabel={showLabel} mode={mode} />
+ <Progress value={value} width={width} showLabel={showLabel} />
</div>
);
}
diff --git a/registry/remocn-ui/settings-toggle-flow/index.tsx b/registry/remocn-ui/settings-toggle-flow/index.tsx
index bdfcc02e..5c6916d9 100644
--- a/registry/remocn-ui/settings-toggle-flow/index.tsx
+++ b/registry/remocn-ui/settings-toggle-flow/index.tsx
@@ -289,7 +289,7 @@ export function SettingsToggleFlow({
...reveal(enterSwitch),
}}
>
- <Switch style={switchStyle} mode={mode} theme={theme} />
+ <Switch style={switchStyle} theme={theme} />
</div>
{}
diff --git a/registry/remocn-ui/switch/__tests__/switch.test.ts b/registry/remocn-ui/switch/__tests__/switch.test.ts
index ddd0ca04..562b0110 100644
--- a/registry/remocn-ui/switch/__tests__/switch.test.ts
+++ b/registry/remocn-ui/switch/__tests__/switch.test.ts
@@ -15,7 +15,6 @@ type SnippetValues = {
state?: string;
label?: string;
size?: string;
- mode?: string;
primary?: string;
};
@@ -110,7 +109,6 @@ describe("switchConfig.snippet: default props are omitted", () => {
state: "checked",
label: "",
size: "default",
- mode: "light",
primary: "#171717",
});
@@ -122,10 +120,6 @@ describe("switchConfig.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("switchConfig.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/switch/config.ts b/registry/remocn-ui/switch/config.ts
index 08ec02e7..7afb08e3 100644
--- a/registry/remocn-ui/switch/config.ts
+++ b/registry/remocn-ui/switch/config.ts
@@ -18,23 +18,17 @@ export const switchConfig: 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 SwitchState) ?? "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 switchConfig: 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/switch/index.tsx b/registry/remocn-ui/switch/index.tsx
index 9370ffba..7a34a188 100644
--- a/registry/remocn-ui/switch/index.tsx
+++ b/registry/remocn-ui/switch/index.tsx
@@ -13,7 +13,6 @@ export interface SwitchProps {
size?: SwitchSize;
theme?: Partial<RemocnTheme>;
primary?: string;
- mode?: "light" | "dark";
className?: string;
}
@@ -70,12 +69,11 @@ export function Switch({
size = "default",
theme: themeOverride,
primary,
- mode,
className,
}: SwitchProps) {
const theme = useRemocnTheme(
{ ...themeOverride, ...(primary ? { primary } : {}) },
- mode,
+ "light",
);
const sizeStyle = SIZE_STYLES[size];
@@ -92,7 +90,7 @@ export function Switch({
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/tooltip/__tests__/tooltip.test.ts b/registry/remocn-ui/tooltip/__tests__/tooltip.test.ts
index 8397b4f2..5acac498 100644
--- a/registry/remocn-ui/tooltip/__tests__/tooltip.test.ts
+++ b/registry/remocn-ui/tooltip/__tests__/tooltip.test.ts
@@ -20,7 +20,6 @@ type SnippetValues = {
state?: string;
label?: string;
side?: string;
- mode?: string;
};
const snippet = (values: SnippetValues): string =>
tooltipConfig.snippet(values as Record<string, unknown>);
@@ -388,22 +387,6 @@ describe("tooltipConfig.controls: side", () => {
});
});
-describe("tooltipConfig.controls: mode", () => {
- it("mode is a select control", () => {
- expect(tooltipConfig.controls.mode.type).toBe("select");
- });
-
- it("mode options are ['light', 'dark']", () => {
- const ctrl = tooltipConfig.controls.mode;
- if (ctrl.type !== "select") throw new Error("expected select");
- expect(ctrl.options).toEqual(["light", "dark"]);
- });
-
- it("mode default is 'light'", () => {
- expect(tooltipConfig.controls.mode.default).toBe("light");
- });
-});
-
describe("tooltipConfig.controls: label", () => {
it("label is a text control", () => {
expect(tooltipConfig.controls.label.type).toBe("text");
@@ -464,11 +447,6 @@ describe("tooltipConfig.snippet: default props are omitted", () => {
const out = snippet({ state: "visible", side: "top" });
expect(out).not.toContain("side=");
});
-
- it("omits mode when it equals the default 'light'", () => {
- const out = snippet({ state: "visible", mode: "light" });
- expect(out).not.toContain("mode=");
- });
});
describe("tooltipConfig.snippet: non-default props are emitted", () => {
@@ -489,12 +467,6 @@ describe("tooltipConfig.snippet: non-default props are emitted", () => {
'side="right"',
);
});
-
- it("emits mode='dark' when non-default", () => {
- expect(snippet({ state: "visible", mode: "dark" })).toContain(
- 'mode="dark"',
- );
- });
});
describe("tooltipConfig.snippet: state options round-trip", () => {
diff --git a/registry/remocn-ui/tooltip/config.ts b/registry/remocn-ui/tooltip/config.ts
index 9567ad9c..7f450e14 100644
--- a/registry/remocn-ui/tooltip/config.ts
+++ b/registry/remocn-ui/tooltip/config.ts
@@ -20,30 +20,22 @@ export const tooltipConfig: 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 TooltipState) ?? "visible";
const label = values.label as string | undefined;
const side = values.side as string | undefined;
- const mode = values.mode as string | undefined;
const props: string[] = [
` state="${state}"`,
` label="${label ?? DEFAULT_LABEL}"`,
];
if (side !== undefined && side !== "top") props.push(` side="${side}"`);
- if (mode !== undefined && mode !== "light")
- props.push(` mode="${mode}"`);
return `import { Tooltip } from "@/components/remocn/tooltip";
diff --git a/registry/remocn-ui/tooltip/index.tsx b/registry/remocn-ui/tooltip/index.tsx
index 4449e888..99d676c1 100644
--- a/registry/remocn-ui/tooltip/index.tsx
+++ b/registry/remocn-ui/tooltip/index.tsx
@@ -12,7 +12,6 @@ export interface TooltipProps {
label: string;
side?: TooltipSide;
theme?: Partial<RemocnTheme>;
- mode?: "light" | "dark";
className?: string;
}
@@ -58,10 +57,9 @@ export function Tooltip({
label,
side = "top",
theme: themeOverride,
- mode,
className,
}: TooltipProps) {
- const theme = useRemocnTheme(themeOverride, mode);
+ const theme = useRemocnTheme(themeOverride, "light");
const v = style ?? tooltipStyle(state);
const bg = theme.foreground;
diff --git a/registry/remocn-ui/tooltip/preview.tsx b/registry/remocn-ui/tooltip/preview.tsx
index e9aa5010..543cc831 100644
--- a/registry/remocn-ui/tooltip/preview.tsx
+++ b/registry/remocn-ui/tooltip/preview.tsx
@@ -1,6 +1,5 @@
"use client";
-import { useRemocnTheme } from "@/lib/remocn-ui";
import {
Tooltip,
type TooltipSide,
@@ -11,17 +10,13 @@ export interface TooltipPreviewProps {
label?: string;
side?: TooltipSide;
state?: TooltipState;
- mode?: "light" | "dark";
}
export function TooltipPreview({
label = "Add to library",
side = "top",
state = "visible",
- mode,
}: TooltipPreviewProps) {
- const theme = useRemocnTheme(undefined, mode);
-
return (
<div
style={{
@@ -30,10 +25,10 @@ export function TooltipPreview({
display: "flex",
alignItems: "center",
justifyContent: "center",
- background: theme.background,
+ background: "transparent",
}}
>
- <Tooltip label={label} side={side} state={state} mode={mode} />
+ <Tooltip label={label} side={side} state={state} />
</div>
);
}