# Comparison wipe

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

Source: https://legend.so/slides/effects/comparison-wipe/

Legend Slides: Preview.

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

[Comparison wipe preview](https://legend.so/slides/effects/previews/comparison-wipe/914be8591c218b3651041bb280924ebaddc636a3a7d2d9ae727091d88b987979.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=comparison-wipe) [Download example](https://legend.so/slides/effects/examples/comparison-wipe/48b06699355d92f34a5d7daaf12aee54860c9055624794a718477ee27d84a2a3.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

comparison-wipe.mdx

```mdx
---
title: Comparison wipe
---

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

export function Panel({ refined }) { return <View style={{ flex: 1, padding: 90, backgroundColor: refined ? "#083344" : "#172033", justifyContent: "center" }}><Text style={{ color: "white", fontSize: 72 }}>{refined ? "Clear signal" : "Too much noise"}</Text><View style={{ flexDirection: "row", gap: 28, marginTop: 48 }}>{[0, 1, 2, 3].map(i => <View key={i} style={{ width: 245, height: refined ? 95 + i * 65 : 180 + (i % 2) * 150, borderRadius: 18, backgroundColor: refined ? "#22d3ee" : i % 2 ? "#6d28d9" : "#a3346b" }} />)}</View></View>; }

# Comparison wipe

<View style={{ width: 1696, height: 650 }}>
<Steps count={2}>{step => <ComparisonWipe position={step > 0 ? 0.5 : 0} before={<Panel refined={false} />} after={<Panel refined />} beforeLabel="Before" afterLabel="After" 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/comparison-wipe.md)[Report a documentation correction](https://github.com/LegendApp/legend-docs/issues/new?title=Docs%3A+Comparison+wipe&body=Page%3A+https%3A%2F%2Flegend.so%2Fslides%2Feffects%2Fcomparison-wipe%0A%0AWhat+is+incorrect+or+missing%3F%0A%0AExpected+behavior+or+supporting+source%3A%0A)
