Effects
LEGEND APPSPreview

Content swap

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

All effects
Recorded in Legend Slides for macOS (release build).

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
---
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 →

More in the presenting pack