Skip to content
v0.2.10

Badge

A compact, noninteractive label for status and metadata.

Preview
Draft

Use Badge

Badge is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
badge.tsxTSX
"use client";

import { FloodRoot, Badge } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Badge tone="success">Active</Badge>
    </FloodRoot>
  );
}

Design notes

  • Use text to communicate status; color is supplementary.
  • Tone, size and visual variant are independent. This is not a selectable or removable chip.
  • Available in 0.2.4. Use FloodRoot for the neutral dark recipe.

API reference

PropValuesDefault
size"sm" | "md" | "lg""md"
tone"neutral" | "accent" | "error" | "warning" | "success" | "info""neutral"
variant"subtle" | "outline""subtle"
Native HTML propsHTMLAttributes<HTMLSpanElement>Forwarded
View TypeScript source