# IconButton

An icon-only action with a required accessible name.

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

export function Example() {
  return (
    <FloodRoot>
      <IconButton label="Add idea">
        <Plus />
      </IconButton>
    </FloodRoot>
  );
}
```

## Design notes

- Provide a meaningful action label, rather than the name of the glyph.
- Supply a licensed SVG. IconButton wraps it in a decorative IconSlot sized to the control.
- Connect onClick to your host action. The interactive preview adds a local count; the basic usage snippet only shows composition.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `variant` | `"solid" \| "subtle" \| "outline" \| "ghost"` | `"subtle"` |
| `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
| `loading` | `boolean` | `—` |
| `label` | `string` | `Required` |
| `Native HTML props` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label">` | `Forwarded` |
