# SaveStatus

Compact feedback for unsaved, saving, saved and failed changes.

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, SaveStatus } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <SaveStatus state="saving" />
    </FloodRoot>
  );
}
```

## Design notes

- Set state from the actual draft or save operation. Show saved only after the host accepts the change. Idle has no default message.
- Place near the form actions or in a document header when work saves automatically. Supply label to localize the message or describe the specific outcome.
- Disable announce when another owner already announces the same state. Keep recovery instructions or field errors in their existing feedback components.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `state` | `keyof typeof saveStatusAppearance` | `Required` |
| `label` | `string` | `—` |
| `announce` | `boolean` | `true` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLSpanElement>, "children" \| "role">` | `Forwarded` |
