# Button

Xojo provides a <span class="title-ref">Button</span> control for desktop, mobile and web projects:

- `DesktopButton</api/user_interface/desktop/desktopbutton>`
- `MobileButton</api/user_interface/mobile/mobilebutton>`
- `WebButton</api/user_interface/web/webbutton>`

## Common members

These events, methods and properties are both common amongst the desktop, mobile and web versions of the control and are the most commonly used. See the individual controls for more members and details.

### Events

| Name    | Description                                                                |
|---------|----------------------------------------------------------------------------|
| Pressed | The <span class="title-ref">button</span> has been pressed/tapped/clicked. |

### Methods

| Name  | Description                                                                                                                    |
|-------|--------------------------------------------------------------------------------------------------------------------------------|
| Press | Causes the <span class="title-ref">button</span> to animate as if the user pressed it. This is not supported for MobileButton. |

### Properties

| Name    | Description                                                                                                                                                              |
|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Caption | The text that appears on the <span class="title-ref">button</span>.                                                                                                      |
| Default | Dictates whether or not the <span class="title-ref">button</span> is the default <span class="title-ref">button</span>. This is only applicable to desktop and web apps. |
| Enabled | Indicates if the <span class="title-ref">button</span> is clickable/tappable or not.                                                                                     |

<div class="seealso">

`DesktopButton</api/user_interface/desktop/desktopbutton>`, `MobileButton</api/user_interface/mobile/mobilebutton>`, and `WebButton</api/user_interface/web/webbutton>`

</div>
