adit-firdaus

Notice Bar

Component

About

A full-width, dismissible system banner for transient status messages (recording, connection, alerts) with an optional measured text marquee for long messages.

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

Code

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

Usage.tsx

import { NoticeBar } from "@/components/ui/notice-bar";
import { IoLinkOutline } from "react-icons/io5";

function Screen({ children }: { children: React.ReactNode }) {
  return (
    <div
      style={{
        maxWidth: 420,
        width: "100%",
        borderRadius: "var(--may-radius-sheet)",
        overflow: "hidden",
        background: "var(--may-color-surface)",
      }}
    >
      {children}
      <div
        style={{
          padding: "var(--may-space-5) var(--may-space-4)",
          color: "var(--may-color-text-secondary)",
          fontSize: "var(--may-text-subheadline)",
        }}
      >
        Mail · 12 unread
      </div>
    </div>
  );
}

export default function NoticeBarDemo() {
  return (
    <div className="w-full h-screen flex items-center justify-center bg-[var(--may-color-bg,#f2f2f7)] p-6">
      <Screen>
        <NoticeBar tone="tint" icon={<IoLinkOutline aria-hidden />}>
          Personal Hotspot: 1 Connection
        </NoticeBar>
      </Screen>
    </div>
  );
}

Dependencies

More by adit-firdaus

View all
  • Steps

    Steps

    36
  • Popover

    Popover

    3
  • Adaptive Card

    Adaptive Card

  • Box

    Box

  • Pagination

    Pagination

  • Adaptive Sheet

    Adaptive Sheet

  • Label

    Label

  • Kbd

    Kbd