vamsiy78

Banner

Component

About

A page-wide announcement bar with info/success/warning tones, an optional action, and controlled or local dismissal.

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

Code

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

Usage.tsx

import { Banner } from "@/components/ui/banner";
export default function BannerDemo() {
  return (
    <Banner
      className="w-full max-w-lg"
      title="A new workspace view is ready"
      description="Your team can switch to the updated layout at any time."
      action={
        <a
          href="#workspace"
          className="text-primary rounded-sm text-sm font-semibold underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50"
        >
          Explore the update
        </a>
      }
      dismissible
    />
  );
}

Dependencies

More by vamsiy78

View all
  • Segmented Control

    Segmented Control

    8
  • Animated Beam

    Animated Beam

    7
  • Agent Roster

    Agent Roster

    5
  • Table Of Contents

    Table Of Contents

    1
  • API Key Field

    API Key Field

    1
  • Toast Stack

    Toast Stack

  • Team Portrait Grid

    Team Portrait Grid

  • Image Cropper

    Image Cropper