mayurrawte

Alert

Component

About

An inline message box for showing info, success, warning, or destructive feedback with an optional title and description.

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";

export default function AlertDemo() {
  return (
    <div className="flex w-full max-w-md flex-col gap-3">
      <Alert variant="default">Heads up — this server is in preview.</Alert>
      <Alert variant="success">
        Connected to github-mcp. 12 tools available.
      </Alert>
      <Alert variant="warning">Your token expires in 2 days.</Alert>
      <Alert variant="destructive">Connection lost. Reconnecting…</Alert>
    </div>
  );
}

More by mayurrawte

View all
  • Feedback Buttons

    Feedback Buttons

    4
  • Streaming Text

    Streaming Text

    4
  • MCP Scope Inspector

    MCP Scope Inspector

    2
  • Tooltip

    Tooltip

    2
  • Accordion

    Accordion

    2
  • Skeleton

    Skeleton

    2
  • Select Dropdown

    Select Dropdown

    1
  • Loader

    Loader

    1