ai 2

Alert Dialog Layout

Component 2

About

A self-contained confirmation modal family (centered, horizontal, compact, wide, split layouts) with an icon, title, description and confirm/cancel buttons, animated with framer motion.

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

Code

How Alert Dialog Layout is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { CenteredAlert } from "@/components/ui/alert-dialog-layout";

export default function AlertDialogLayoutDemo() {
  return (
    <div className="flex min-h-[400px] w-full items-center justify-center bg-background">
      <CenteredAlert
        trigger={
          <button
            type="button"
            className="inline-flex h-9 items-center justify-center rounded-md bg-danger px-4 text-sm font-medium text-danger-foreground transition-colors hover:bg-danger/90"
          >
            Delete account
          </button>
        }
        title="Delete your account?"
        description="This will permanently delete your account and remove your data from our servers."
        confirmLabel="Delete"
        cancelLabel="Cancel"
      />
    </div>
  );
}

Dependencies

More by ai 2

View all
  • Ripple Buttons

    Ripple Buttons

    31
  • Styled Toggle Switches

    Styled Toggle Switches

    14
  • Styled Progress Bars

    Styled Progress Bars

    14
  • Styled Badges

    Styled Badges

    10
  • OTP Pin Input

    OTP Pin Input

    8
  • Particle Toggles

    Particle Toggles

    7
  • Input Group Glass

    Input Group Glass

    6
  • File Input

    File Input

    6