# ButtonArgs

Interface

Source: https://github.com/playcanvas/pcui/blob/77ed2b8ba8660c9644049b0d1942652721e7a6c4/src/components/Button/index.ts#L9

The arguments for the [Button](https://api.playcanvas.com/pcui/classes/Button.md) constructor.

## Properties

### icon

```ts
icon?: string
```

The CSS code for an icon for the button. e.g. 'E401' (notice we omit the '\\' character). Defaults to ''.

### size

```ts
size?: "small"
```

Sets the 'size' type of the button. Can be 'small' or `null`. Defaults to `null`.

### text

```ts
text?: string
```

Sets the text of the button. Defaults to ''.

### unsafe

```ts
unsafe?: boolean
```

If `true`, the [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML) property will be
used to set the text. Otherwise, [textContent](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)
will be used instead. Defaults to `false`.

## Inherited from ElementArgs

- `alignItems?: string`
- `alignSelf?: string`
- `binding?: BindingBase`
- `class?: string | string[]`
- `dom?: string | HTMLElement`
- `enabled?: boolean`
- `error?: boolean`
- `flexBasis?: string | number`
- `flexDirection?: string`
- `flexGrow?: string | number`
- `flexShrink?: string | number`
- `flexWrap?: string`
- `height?: number`
- `hidden?: boolean`
- `id?: string`
- `ignoreParent?: boolean`
- `isRoot?: boolean`
- `justifyContent?: string`
- `justifySelf?: string`
- `link?: { observer: Observer | Observer[]; path: string | string[] }`
- `onChange?: (value: unknown) => void`
- `onClick?: () => void`
- `onRemove?: () => void`
- `parent?: Element`
- `readOnly?: boolean`
- `style?: string`
- `tabIndex?: number`
- `width?: number`
