---
title: Swap Card
description: When button is toggle card swipes up and down
labels: ["requires interaction", "toggle"]
author: Sumingurung9
---

<ComponentPreview name="card-swap-card--docs" />

## Installation

<Steps>
<Step>Install dependencies</Step>

This uses [Filpcard](/docs/card/flip-card) for the text. Install it by following the instructions [here](/docs/card/flip-card#installation). You can use simple text only if you don't want to use WaveReveal.

This uses [WaveReveal](/docs/text/wave-reveal) for the text. Install it by following the instructions [here](/docs/text/wave-reveal#installation). You can use simple text only if you don't want to use WaveReveal.

```bash
npm install lucide-react
```

<Step>Run the following command</Step>

It will create a new file called `swap-card.tsx` inside the `components/animata/card` directory.

```bash
mkdir -p components/animata/card && touch components/animata/card/swap-card.tsx
```

<Step>Paste the code</Step>

Open the newly created file and paste the following code:

```jsx file=<rootDir>/animata/card/swap-card.tsx

```

</Steps>

## Credits

Built by [Sumin Gurung](https://github.com/GrgSumin)
