# PasswordInput

A password field with one named visibility 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, Field, PasswordInput } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Field label="Password">
        {control => <PasswordInput {...control} name="password-input" />}
      </Field>
    </FloodRoot>
  );
}
```

## Design notes

- Use visible/onVisibleChange for controlled visibility or defaultVisible for an initial reveal. Translate showPasswordLabel/hidePasswordLabel. Read-only still permits inspection; disabled blocks actions. Native value/onChange, autocomplete, form and ref are preserved. Visibility does not change the value.
- Composes Flood InputGroup, IconSlot and IconButton using existing semantic geometry and feedback states. Available in 0.2.5.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
| `invalid` | `boolean` | `—` |
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
| `visible` | `boolean` | `—` |
| `defaultVisible` | `boolean` | `false` |
| `onVisibleChange` | `(visible: boolean) => void` | `—` |
| `showPasswordLabel` | `string` | `"Show password"` |
| `hidePasswordLabel` | `string` | `"Hide password"` |
| `Native HTML props` | `Omit<InputHTMLAttributes<HTMLInputElement>, "type" \| "children">` | `Forwarded` |
