# ButtonCommand

> Represents values for the HTML command attribute of the <button> element.

[API reference](/docs/api/index.md) › [HTML](/docs/extensions/html/reference/index.md) › [Form](/docs/extensions/html/reference/form/index.md) › [Values](/docs/extensions/html/reference/form/values/index.md) › ButtonCommand

| enum | `UIAwesome\Html\Form\Values\ButtonCommand` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/Form/Values/ButtonCommand.php`](https://github.com/ui-awesome/html/blob/main/src/Form/Values/ButtonCommand.php#L14) |

Represents values for the HTML `command` attribute of the `<button>` element.

Experimental HTML attribute. Availability and behavior may vary across browsers.

See also: <https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#command>.

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-CLOSE"></span>`CLOSE` | `'close'` | Represents the `close` token. Closes the targeted `<dialog>` element. |
| <span id="case-HIDE_POPOVER"></span>`HIDE_POPOVER` | `'hide-popover'` | Represents the `hide-popover` token. Hides a showing popover element. |
| <span id="case-REQUEST_CLOSE"></span>`REQUEST_CLOSE` | `'request-close'` | Represents the `request-close` token. Triggers a `cancel` event on the targeted `<dialog>`, allowing `preventDefault()` to block closing. |
| <span id="case-SHOW_MODAL"></span>`SHOW_MODAL` | `'show-modal'` | Represents the `show-modal` token. Shows the targeted `<dialog>` element as a modal. |
| <span id="case-SHOW_POPOVER"></span>`SHOW_POPOVER` | `'show-popover'` | Represents the `show-popover` token. Shows a hidden popover element. |
| <span id="case-TOGGLE_POPOVER"></span>`TOGGLE_POPOVER` | `'toggle-popover'` | Represents the `toggle-popover` token. Toggles the visibility of the targeted popover element. |