Components
Count badge
Keep a count close to the thing it describes.
import { … } from "@fungi.computer/caps/components/count-badge";Hero
import { CountBadge } from "@fungi.computer/caps/components/count-badge";
export default function Hero() { return <CountBadge count={4} label="New spore prints" />;}Counts
import { CountBadge } from "@fungi.computer/caps/components/count-badge";
export default function Counts() { return ( <div className="flex flex-wrap items-center gap-3"> <CountBadge count={0} label="Unread" /> <CountBadge count={7} label="Baskets" /> <CountBadge count="99+" label="Patches" /> </div> );}Props
CountBadgeProps
| Prop | Type | Description |
|---|---|---|
count | ReactNode | |
tone? | "neutral" | | Semantic count emphasis; warnings call attention to items needing action. |
label? | ReactNode |
countReactNodetone?"neutral" |"warning" Semantic count emphasis; warnings call attention to items needing action.
label?ReactNode
Full types: API reference.