# Select

A Flood choice field with its own popup and native form integration.

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

export function Example() {
  return (
    <FloodRoot>
      <Field label="Visibility">
        {(control) => (
          <Select {...control} name="visibility" defaultValue="private">
            <option value="private">Private</option>
            <option value="team">Team</option>
          </Select>
        )}
      </Field>
    </FloodRoot>
  );
}
```

## Design notes

- Single selection uses a Flood trigger and listbox, including the popup. Native options and optgroups supply the choices; disabled choices cannot be selected.
- Use arrows, Home/End and typing to navigate; Enter or Space confirms, Escape cancels. The popup scrolls active choices into view.
- Select fills its Field; constrain the form or field wrapper. Multiple and numeric size greater than one use a native inline listbox rather than a popup.
- A native form bridge preserves name, value/defaultValue, required, disabled, onChange and HTMLSelectElement ref. Inspect the matching guide for the visible focus contract.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
| `invalid` | `boolean` | `—` |
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
| `Native HTML props` | `SelectHTMLAttributes<HTMLSelectElement>` | `Forwarded` |
