# IconButtonProps

Props for [`IconButton`](https://docs.mapcairn.com/api/map/IconButton.md).

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { IconButtonProps } from "@mapcairn/map";
 
interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-busy" | "aria-controls" | "aria-disabled" | "aria-expanded" | "aria-label" | "aria-pressed" | "children" | "disabled" | "type">
```

## Properties

### busy

```ts
readonly busy?: boolean;
```

Shows a loader in place of the icon and sets `aria-busy`. Clicks are
ignored while busy. The loader spins only when motion is allowed.

### controls

```ts
readonly controls?: string;
```

Sets `aria-controls` to the id of the element it opens or changes.

### disabled

```ts
readonly disabled?: boolean;
```

Disables the action with `aria-disabled`. The button stays focusable so
its name is still discoverable, and clicks do nothing.

### expanded

```ts
readonly expanded?: boolean;
```

Sets `aria-expanded` for a button that opens a popover or panel.

### icon

```ts
readonly icon: IconComponent;
```

The icon to show, imported by name from `@phosphor-icons/react`.

### label

```ts
readonly label: string;
```

The accessible name. Describe the action, for example "Zoom in".

### mirrorInRtl

```ts
readonly mirrorInRtl?: boolean;
```

Flips the icon when the page reads right to left, for one that points along the reading direction.

### pressed

```ts
readonly pressed?: boolean;
```

Makes it a toggle. Renders `aria-pressed` and a shape change (tinted fill
plus a bar under the icon). Leave undefined for a plain action button.

### size

```ts
readonly size?: "control" | "compact";
```

`control` is 48 px square and `compact` is 44 px. Defaults to `control`.

## See also

- [`IconComponent`](https://docs.mapcairn.com/api/map/IconComponent.md)

Source: [packages/map/src/ui/IconButton/IconButton.tsx:9](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/ui/IconButton/IconButton.tsx#L9)
