Morph Status Button

Morph Status Button: Button that morphs through idle, loading, success, and error states seamlessly in place with zero layout shift. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.

Install Morph Status Button

npx motion-ui-skill add morph-status-button

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

Dependencies

  • clsx
  • motion
  • react
  • tailwind-merge

Source files

Morph Status Button

Button that morphs through idle, loading, success, and error states seamlessly in place with zero layout shift.

Install

npx motion-ui-skill add morph-status-button

Dependencies

  • clsx
  • motion
  • react
  • tailwind-merge

Usage

"use client";

import { MorphStatusButton } from "@/components/buttons/morph-status-button";

export function MorphStatusButtonDemo() {
  return (
    <div className="flex items-center justify-center p-6">
      <MorphStatusButton>Click Me</MorphStatusButton>
    </div>
  );
}

API Reference

MorphStatusButton

Prop Type Default Required Description
status `"idle" "loading" "success" "error"`
className string — No Additional CSS classes

Browse this category