Skip to main content


A simple button that can have an icon. Button can be twoState and can have a badge with a number, which can be useful for displaying the number of new messages, etc.

Button control

Related sample: Form. All controls

Adding Button

You can easily add a Button control during initialization of a form:

const form = new dhx.Form("form_container", {
rows: [
type: "button",
name: "button",
text: "Send",
size: "medium",
view: "flat",
color: "primary"


View the full list of configuration properties of the Button control.

Working with Button

You can manipulate a Button control by using methods or events of the object returned by the getItem() method.

For example, you can disable a control on a page:



Check the full list of methods of the Button control.


Check the full list of events of the Button control.