# ChipProps

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

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

## Signature

```ts
import type { ChipProps } from "@mapcairn/map";
 
interface ChipProps extends Omit<HTMLAttributes<HTMLElement>, "children" | "onClick">
```

## Properties

### children

```ts
readonly children: ReactNode;
```

The chip text.

### icon

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

A leading icon, imported by name from `@phosphor-icons/react`.

### onClick

```ts
readonly onClick?: MouseEventHandler<HTMLButtonElement>;
```

Makes the chip a toggle button. Without it the chip is a plain label.

### selected

```ts
readonly selected?: boolean;
```

Whether the chip is on. Shown with a check icon in place of the leading
icon. On a chip with `onClick` it is also `aria-pressed`.

## See also

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

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