Moumen Soliman

Delete Button

Buttons 263

About

Delete button that expands to show a confirmation button with smooth animations.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Delete Button to your project and fits it to your theme.

Code

How Delete Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { NativeDelete } from "@/components/ui/delete-button";
import { useState } from "react";

export default function DemoOne() {
  const [deleted, setDeleted] = useState(false);

  return (
    <>
      {!deleted ? (
        <NativeDelete
          onConfirm={() => {
            // Handle confirmation UI shown
            console.log("Confirm!")
          }}
          onDelete={() => {
            setDeleted(true);
            setTimeout(() => setDeleted(false), 2000);
          }}
        />
      ) : (
        <div className="text-sm text-muted-foreground">Deleted!</div>
      )}
    </>
  );
}

Dependencies

More by Moumen Soliman

View all
  • Interactive Logs Table

    Interactive Logs Table

    1.4K
  • Glass Blog Card

    Glass Blog Card

    1.1K
  • Glowy Waves Hero

    Glowy Waves Hero

    921
  • Gallery Grid with Lightbox

    Gallery Grid with Lightbox

    790
  • Expanding Search Dock

    Expanding Search Dock

    762
  • Glassmorphism Portfolio

    Glassmorphism Portfolio

    653
  • Hero Section

    Hero Section

    605
  • Glass Checkout Card

    Glass Checkout Card

    483

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    32
  • Button

    Button

    6
  • Button

    Button

    14
  • Button Group

    Button Group

    37
  • Split Button

    Split Button

    32