# AnchoredReveal

Open a menu or callout from a precise point in its own coordinates.

Page: https://20cuts.com/docs/components/anchored-reveal

## 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 { AnchoredReveal } from "./system/motion";

export default function VideoScene() {
  return (
    <AnchoredReveal anchor={{x: 0, y: 0}} from={0.2} at={0.5}><div style={{width: 400, padding: 32, background: "white"}}>Choose a scene</div></AnchoredReveal>
  );
}
```


## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| children (required) | ReactNode | None | React content to display. |
| anchor (required) | Point | None | Transform origin in local pixel coordinates. |
| from | number | 0.75 | Starting scale; the final scale is 1. |
| at | number | 0 | Start time in seconds within the current Remotion Sequence. |
| duration | number | 0.6 | Animation duration in seconds. |
| 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 { AnchoredReveal } 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 AnchoredRevealExample() { return <Stage><div style={{ position: "relative", width: 600, height: 330 }}><div style={{ position: "absolute", left: 0, top: 0, padding: "18px 28px", borderRadius: 12, background: ink, color: "#fff", fontSize: 24 }}>Add a scene +</div><AnchoredReveal anchor={{ x: 0, y: 0 }} from={0.2} at={0.7} duration={0.85} style={{ position: "absolute", top: 78, left: 0 }}><div style={{ ...card, width: 450, display: "grid", gap: 24, fontSize: 28 }}><strong>Choose a starting point</strong><div>↗ Product reveal</div><div>≡ Feature walkthrough</div><div>◎ Closing frame</div></div></AnchoredReveal></div></Stage>; }
```

Save it as src/AnchoredRevealExample.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 { AnchoredRevealExample } from "./AnchoredRevealExample";

registerRoot(() => (
  <Composition
    id="AnchoredRevealExample"
    component={AnchoredRevealExample}
    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 AnchoredReveal component in this project's Remotion composition. Open a product menu from its top-left anchor after the interaction beat; keep its content at final layout size. 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.
