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
  • Animated Beam

    Animated Beam

    53
  • Glow Border

    Glow Border

    16
  • Agent Roster

    Agent Roster

    13
  • Segmented Control

    Segmented Control

    12
  • FAQ Accordion Section

    FAQ Accordion Section

    3
  • API Key Field

    API Key Field

    3
  • Signature Pad

    Signature Pad

    1
  • Table Of Contents

    Table Of Contents

    1