Button
- 2 minutes to read
Button is an interactive UI element that allows users to trigger specific actions or events within an application.

Getting Started
The Button UI Control is based on the DevExtreme Button component.
To add this control to your project, follow instructions in the following help topics:
- Configure a Visual Studio Project or Configure a non Visual Studio Project
- Add Controls to a Project
- Razor Syntax
Basic Syntax
@(Html.DevExtreme().Button()
.Text("Click to Test")
.OnClick("onClick")
)
<script>
function onClick(e) {
DevExpress.ui.notify("The button was clicked.")
}
</script>
Built-in Capabilities and Configuration Guides
Labeling
You can label DevExtreme Button with text, an icon, or both to indicate its function.State Management
Button states include default, hover, active, and disabled.Action Binding
You can bind Button to a function triggered when the button is clicked. Actions can include submitting a form, navigating to another page, or executing a custom script.Predefined Types
Button includes a set of predefined color schemes and styling modes.
API
Server-Side API
- Initialization
- Call the Button() method to create a Button control. This action initializes a ButtonBuilder instance. Use the instance methods to specify Button options and event handlers.
- Options
- For a complete option list, see Options. For details on how to specify control options, refer to the following help topic: Specify Options.
- Events
- For available events, see Events. For details on how to handle events, refer to the following help topic: Handle Events and Define Callbacks.
Client-Side API
- Options
- If you need to specify the Button options dynamically on the client side, use client-side API. For a complete option list, see DevExtreme Button options.
- Methods
- For a list of available methods, see DevExtreme Button methods. For details on how to call methods, refer to the following help topic: Call Methods.
Accessibility
For more information on Button accessibility compliance, refer to the following help topic: Accessibility.