Skip to main content

Button

here are additional JSON schemas for different button configurations:

Schema for a Primary Button

[
{
"name": "submit-button",
"meta": {
"displayName": "Submit",
"displayType": "button",
"readOnly": true,
"description": "Click to submit the form",
"isDisabled": false,
"htmlProps": {
"variant": "contained",
"size": "small"
}
}
}
]

Example

Button Configuration Screenshot

Field Properties

Properties used by this field (inside form field in schema)

NameDescriptionType
nameThe unique identifier for the button control instance.string
displayNameA string that sets the display name of the button control.string
descriptionA string providing additional information or instructions about the button control.string
isDisabledA boolean indicating if the button control is disabled.boolean
htmlPropsAn object containing additional style properties for the button control.object
variantThe variant of the button (within displayProps). Defaults to "contained".string
sizeThe size of the button (within displayProps). Can be "small", "medium", or "large".string
readOnlyA readonly field is not editable and value cannot be changedboolean
classNameA string to add custom class names for styling.string

These schemas provide a variety of button configurations that you can use in different scenarios in your application.

Schema for a Disabled Button

[
{
"name": "disabled-button",
"form": {
"displayName": "Disabled Button",
"description": "This button is disabled",
"isDisabled": true,
"displayProps": {
"variant": "outlined",
"size": "medium"
}
}
}
]

Schema for a Small Button

[
{
"name": "small-button",
"form": {
"displayName": "Small Action",
"description": "Click for a small action",
"isDisabled": false,
"displayProps": {
"variant": "text",
"size": "small"
}
}
}
]

Schema for a Button with Custom Class

[
{
"name": "custom-button",
"form": {
"displayName": "Custom Styled Button",
"description": "This button has a custom class for styling",
"isDisabled": false,
"displayProps": {
"variant": "contained",
"size": "medium"
},
"className": "custom-button-class"
}
}
]