Serafim

Alert

Buttons 65

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, AlertContent, AlertTitle, AlertDescription } from "@/components/ui/alert"
import { Button } from "@/components/ui/button"
import { X } from "lucide-react"

function AlertCookieNotice() {
  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>
      }
    >
      <AlertContent>
        <AlertTitle>We Value Your Privacy 🍪</AlertTitle>
        <AlertDescription>
          We use cookies to improve your experience, and show personalized content.
        </AlertDescription>
        <div className="flex gap-2 pt-3">
          <Button size="sm">Accept</Button>
          <Button size="sm" variant="outline">Decline</Button>
        </div>
      </AlertContent>
    </Alert>
  )
}

export { AlertCookieNotice }

Dependencies

More by Serafim

View all
  • Spline Scene

    Spline Scene

    9.8K
  • Testimonials with Marquee

    Testimonials with Marquee

    2.4K
  • Gradient Button

    Gradient Button

    2K
  • Pixel Canvas

    Pixel Canvas

    926
  • Animated Blur Number

    Animated Blur Number

    834
  • Empty State

    Empty State

    798
  • Balloons

    Balloons

    788
  • Status Badge

    Status Badge

    693

More in Buttons

View all
  • Button

    Button

    12
  • Notification Button

    Notification Button

    115
  • Texture Button

    Texture Button

    105
  • HeroUI Button Group

    HeroUI Button Group

    2
  • App Store Button

    App Store Button

    481
  • Button

    Button

    78
  • Split Button

    Split Button

    16
  • Base Button

    Base Button

    1