# SettingRow

A setting label and optional explanation with an independent trailing action.

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

export function Example() {
  return (
    <FloodRoot>
      <SettingRow label="Account access" description="Control who can sign in." action={<Link href="/settings/access" variant="subtle" size="sm">Manage access</Link>} />
    </FloodRoot>
  );
}
```

## Design notes

- Use SettingRow for one setting that opens a detail view, runs an independently named action, or shows a current value. Name the action for what it does.
- The adaptive layout puts value and action together beneath the description when there is too little room. Long values wrap within their share of the row. Use inline only where the label and action still fit. Use stacked for a consistently narrow surface.
- Opt into valueOverflow=truncate for a plain secondary value whose visible prefix is meaningful. It reveals the full text when clipped. Rich values keep their original layout.
- Use Switch layout=row for an on/off preference and Field for a labeled editable value. Use the same trailing axis across related settings.
- Give the row a description only if it explains a consequence, scope or constraint. The action owns focus and activation.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `label` | `ReactNode` | `Required` |
| `description` | `ReactNode` | `—` |
| `value` | `ReactNode` | `—` |
| `valueOverflow` | `"wrap" \| "truncate"` | `"wrap"` |
| `action` | `ReactNode` | `—` |
| `layout` | `"adaptive" \| "inline" \| "stacked"` | `"adaptive"` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children">` | `Forwarded` |
