# SlideIn

Move a layer in from a chosen direction, with an optional fade.

Page: https://20cuts.com/docs/components/slide-in

## Installation

Run from your product repository:

```sh
npx -y https://20cuts.com/releases/v0.3.0/20cuts-create-0.3.0.tgz video/20cuts
cd video/20cuts
npm ci
npm run studio
```

The installer includes this component, its source dependencies, runnable examples,
and skills for Codex and Claude Code. If 20cuts is already installed, import the
component from its existing source directory.

## Usage

```tsx
import { SlideIn } from "./system/motion";

export default function VideoScene() {
  return (
    <SlideIn from="down" distance={48} at={0.3} duration={0.7}><h1>Ready to launch.</h1></SlideIn>
  );
}
```


## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| children (required) | ReactNode | None | React content to display. |
| at | number | 0 | Start time in seconds within the current Remotion Sequence. |
| duration | number | 0.6 | Animation duration in seconds. |
| from | "up" \| "down" \| "left" \| "right" | "up" | Direction the content enters from. |
| distance | number | 40 | Travel distance in pixels. |
| fade | boolean | true | Fade in while translating. |
| style | CSSProperties | None | Styles applied to the component wrapper. |



## Complete example

This is the source of the fictional component demonstration. Replace its content
with supported behavior and assets from your product.

```tsx
import React, { type CSSProperties, type ReactNode } from "react";

import { AbsoluteFill } from "remotion";

import { SlideIn } from "./system";

const ink = "#141414", lime = "#b6f36b";

const center: CSSProperties = { display: "flex", alignItems: "center", justifyContent: "center" };

const card: CSSProperties = { background: "#fff", border: "1px solid #ddd", borderRadius: 20, padding: 32 };

function Stage({ children, dark = false, style }: {
    children: ReactNode;
    dark?: boolean;
    style?: CSSProperties;
}) {
    return <AbsoluteFill style={{ fontFamily: "Arial, Helvetica, sans-serif", color: dark ? "#fff" : ink, background: dark ? ink : "#f7f7f5", ...center, ...style }}>{children}</AbsoluteFill>;
}

export function SlideInExample() { return <Stage><div style={{ display: "flex", gap: 24 }}>{["Plan", "Build", "Launch"].map((text, i) => <SlideIn key={text} at={0.3 + i * 0.35} from={i === 0 ? "left" : i === 2 ? "right" : "down"} distance={120} duration={1}><div style={{ ...card, width: 260, height: 310, display: "flex", flexDirection: "column", justifyContent: "space-between", background: i === 2 ? lime : "#fff" }}><span style={{ fontSize: 26 }}>0{i + 1}</span><strong style={{ fontSize: 50, letterSpacing: "-0.05em" }}>{text}</strong></div></SlideIn>)}</div></Stage>; }
```

Save it as src/SlideInExample.tsx. This demonstration uses
1280×720, 30fps and 180 frames.
For a separate entry point, replace src/index.tsx with this registration, then
run npm run studio:

```tsx
import { Composition, registerRoot } from "remotion";
import { SlideInExample } from "./SlideInExample";

registerRoot(() => (
  <Composition
    id="SlideInExample"
    component={SlideInExample}
    width={1280}
    height={720}
    fps={30}
    durationInFrames={180}
  />
));
```

## Source

- https://20cuts.com/animation-system/library/source/motion/effects.tsx
- https://20cuts.com/animation-system/library/source/motion/core.ts

## Agent instructions

Use the 20cuts SlideIn component in this project's Remotion composition. Reveal the main product panel from below using a 48px move and a 0.7-second settle. Keep motion frame-driven and put timing in seconds relative to the current Sequence. Use the product's actual copy and assets. Preview the composition before rendering.
