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

Components install as source into your project. The interactive page also includes preview, code, documentation and install tabs.

Dependencies

  • clsx
  • lucide-react
  • react
  • tailwind-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

  • clsx
  • lucide-react
  • react
  • tailwind-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

Browse this category