# Content swap

Reveal and compare caller-supplied content while keeping its state mounted.

Source: https://legend.so/slides/effects/content-swap/

Legend Slides: Preview.

[All effects](https://legend.so/slides/effects/)

[Content swap preview](https://legend.so/slides/effects/previews/content-swap/57353c7e7f84117f5b9a17d7a5527b325617c9862dbf088a06958bacc6328649.mp4)

Recorded in Legend Slides for macOS (release build).

[Install in Slides](legend-slides://effects/install?pack=presenting&version=1.0.5) [Open example](legend-slides://effects/example?effect=content-swap) [Download example](https://legend.so/slides/effects/examples/content-swap/83c7fdaeee7f972b03874a4e0c7ddaaf0b7c6c39be5c0bd2f069aadad591ab85.mdx)

Requires a Legend Slides build with effect installation support. Installs the presenting pack (1.0.5, 22 KB source) and its dependencies. macOS host capabilities: reanimated, skia. Installed decks work offline.

## Use it in a deck

content-swap.mdx

```mdx
---
title: Content swap
---

import { View, Text } from "react-native";
import { ContentSwap } from "slides:presenting/Composition";

export function Evidence() { return <View style={{ padding: 70, gap: 30 }}><Text style={{ color: "#e0f2fe", fontSize: 70 }}>The evidence</Text><Text style={{ color: "white", fontSize: 110 }}>7 steps → 2 steps</Text><Text style={{ color: "#94a3b8", fontSize: 42 }}>Same outcome, less work</Text></View>; }
export function Takeaway() { return <View style={{ padding: 70, gap: 28 }}><Text style={{ color: "#67e8f9", fontSize: 70 }}>The takeaway</Text><Text style={{ color: "white", fontSize: 110 }}>Simpler wins.</Text><Text style={{ color: "#94a3b8", fontSize: 42 }}>Keep the path people actually use.</Text></View>; }

# Content swap

<View style={{ width: 1696, height: 650 }}>
<Steps count={2}>{step => <ContentSwap active={step > 0} before={<Evidence />} after={<Takeaway />} style={{ width: 1696, height: 580 }} />}</Steps>
</View>
```

## Configure

**content**

Supply the illustrations or React content.

**style**

Give the composition explicit stage bounds.

Only imported effects enter the compiled deck. [Installation and versioning →](https://legend.so/slides/effects/installation/)

[View Markdown](https://legend.so/slides/effects/content-swap.md)[Report a documentation correction](https://github.com/LegendApp/legend-docs/issues/new?title=Docs%3A+Content+swap&body=Page%3A+https%3A%2F%2Flegend.so%2Fslides%2Feffects%2Fcontent-swap%0A%0AWhat+is+incorrect+or+missing%3F%0A%0AExpected+behavior+or+supporting+source%3A%0A)
