Add to Cart
Add to Cart: Raised 3D add-to-cart key that sinks in while adding, with gentle label crossfades, then pops back up in a solid emerald added state before resetting. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Add to Cart
npx motion-ui-skill add add-to-cart-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxlucide-reactreacttailwind-merge
Source files
Add to Cart
Raised 3D add-to-cart key that sinks in while adding, with gentle label crossfades, then pops back up in a solid emerald added state before resetting.
Install
npx motion-ui-skill add add-to-cart-button
Dependencies
clsxlucide-reactreacttailwind-merge
Usage
"use client";
import { AddToCartButton } from "@/components/buttons/add-to-cart-button";
export function AddToCartButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<AddToCartButton />
</div>
);
}
API Reference
AddToCartButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
className |
string |
— | No | Additional CSS classes |