Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";
import type { SwitchState } from "@/registry/remocn-ui/switch";
export const switchConfig: ComponentConfig = {
componentName: "Switch",
importPath: "@/components/remocn/switch",
controls: {
label: {
type: "text-content",
default: "",
description: "Label",
},
size: {
type: "enum",
default: "default",
variants: {
sm: {},
default: {},
lg: {},
},
description: "Size",
},
state: {
type: "enum",
default: "checked",
variants: {
unchecked: {},
checked: {},
},
description: "State",
},
primary: {
type: "color",
default: "#171717",
description: "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 primary = values.primary as string | undefined;
const props: string[] = [` state="${state}"`];
if (label !== undefined && label !== "") props.push(` label="${label}"`);
if (size !== undefined && size !== "default")
props.push(` size="${size}"`);
if (primary !== undefined && primary !== "#171717")
props.push(` primary="${primary}"`);
return `import { Switch } from "@/components/remocn/switch";
<Switch
${props.join("\n")}
/>`;
},
};