Serafim

Alert

Buttons 44

About

Alert in shadcn/ui format

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

Code

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

Usage.tsx

import { Alert } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { X } from "lucide-react";

function AlertUserMention() {
  return (
    <Alert
      className="min-w-[400px]"
      layout="complex"
      isNotification
      size="lg"
      action={
        <Button
          variant="ghost"
          className="group -my-1.5 -me-2 size-8 p-0 hover:bg-transparent"
          aria-label="Close notification"
        >
          <X
            size={16}
            strokeWidth={2}
            className="opacity-60 transition-opacity group-hover:opacity-100"
          />
        </Button>
      }
    >
      <div className="flex gap-3">
        <img
          className="size-9 rounded-full"
          src="https://cdn.21st.dev/assets/localized/14cb41296d4b988a23157ab26f97a62c2e0cadbd1b4034774106d2175b099a16.jpg"
          width={32}
          height={32}
          alt="Mary Palmer"
        />
        <div className="flex grow flex-col gap-3">
          <div className="space-y-1">
            <p className="text-sm text-muted-foreground">
              <a
                className="font-medium text-foreground hover:underline"
                href="#"
              >
                Mary Palmer
              </a>{" "}
              mentioned you in{" "}
              <a
                className="font-medium text-foreground hover:underline"
                href="#"
              >
                project-campaign-02
              </a>
              .
            </p>
            <p className="text-xs text-muted-foreground">2 min ago</p>
          </div>
          <div className="flex gap-2">
            <Button size="sm">Accept</Button>
            <Button size="sm" variant="outline">
              Decline
            </Button>
          </div>
        </div>
      </div>
    </Alert>
  );
}

export { AlertUserMention };

export default AlertUserMention;

Dependencies

More by Serafim

View all
  • Spline Scene

    Spline Scene

    9.5K
  • Testimonials with Marquee

    Testimonials with Marquee

    2.3K
  • Gradient Button

    Gradient Button

    1.9K
  • Pixel Canvas

    Pixel Canvas

    900
  • Animated Blur Number

    Animated Blur Number

    830
  • Empty State

    Empty State

    775
  • Balloons

    Balloons

    755
  • Status Badge

    Status Badge

    646

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    6
  • Button

    Button

    14
  • Button Group

    Button Group

    37
  • Button

    Button

    32
  • Split Button

    Split Button

    32