hemingtsai

Status Banner

Component

About

An inline, outlined banner for surfacing a status that needs user attention (like low disk space or an unreachable gateway) next to the affected content, with an optional status dot, dismiss button and action slot.

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

Code

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

Usage.tsx

"use client";

import ZBanner from "@/components/ui/zbanner";
import { useState } from "react";

export default function ZBannerDemo() {
  const [visible, setVisible] = useState(true);

  if (!visible) return null;

  return (
    <ZBanner
      tone="warn"
      dot
      title="磁盘空间不足"
      dismissible
      onDismiss={() => setVisible(false)}
    >
      数据目录已占用 82%,低于 10% 时同步会暂停。
    </ZBanner>
  );
}

More by hemingtsai

View all
  • ZCheckbox

    ZCheckbox

  • Floating Action Button

    Floating Action Button

  • Button Group

    Button Group