# Metric

A labeled value with optional contextual trend and supporting text.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

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

export function Example() {
  return (
    <FloodRoot>
      <Metric label="Monthly revenue" value="$24,580" trend={{direction:"up",label:"12.8% higher",tone:"success"}} hint="Compared with the previous month." />
    </FloodRoot>
  );
}
```

## Design notes

- Native definition-list semantics associate the label with its value, trend and hint. Values may be rich content; the host owns currency, number and locale formatting.
- Trend direction and semantic tone are independent: a decreasing failure rate can be good. Its label must communicate the change without relying on the decorative arrow or color. No automatic percentage calculation is performed.
- Compatible addition in 0.2.5. Uses existing Flood semantic tokens and relative geometry.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `label` | `string` | `Required` |
| `value` | `ReactNode` | `Required` |
| `hint` | `ReactNode` | `—` |
| `trend` | `MetricTrend` | `—` |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDListElement>, "children">` | `Forwarded` |
