---
title: Animated Cart Button
description: Interactive cart button with physical 3D drop animations. Items visually drop into the cart with a satisfying 3D bounce animation.
---

<ComponentPreview name="animated-cart-button-demo" />

## Premium Pro Component

This is a premium Pro component. To get access to its source code and advanced interactive configurations:
1. Visit the pricing page: [https://lightswind.com/pricing](https://lightswind.com/pricing)
2. Purchase a license to unlock this component.

If you have already purchased a license, you can install this component directly via our CLI:

```bash
npx lightswind@latest add animated-cart-button
```

*(Note: Make sure you have configured your API key in your project to authenticate your Pro license).*

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">

```bash
npx lightswind@latest add animated-cart-button
```

</TabsContent>

<TabsContent value="manual">

> [!IMPORTANT]
> This is a premium component. Manual copy-paste source code is only available to Pro license holders.
> Please purchase a plan at [https://lightswind.com/pricing](https://lightswind.com/pricing) to unlock manual access, or use the authenticated CLI command:
> 
> ```bash
> npx lightswind@latest add animated-cart-button
> ```

</TabsContent>

</Tabs>

## Usage

```tsx
import AnimatedCartButton from "@/components/lightswind-pro/animated-cart-button"
```

```tsx
import AnimatedCartButton from "@/components/lightswind-pro/animated-cart-button";

export function Demo() {
  return <AnimatedCartButton onAdd={() => console.log("Added!")} itemCount={3} />;
}
```
