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
Field Properties
Properties used by this field (inside form field in schema)
Name | Description | Type |
---|---|---|
name | The unique identifier for the button control instance. | string |
displayName | A string that sets the display name of the button control. | string |
description | A string providing additional information or instructions about the button control. | string |
isDisabled | A boolean indicating if the button control is disabled. | boolean |
htmlProps | An object containing additional style properties for the button control. | object |
variant | The variant of the button (within displayProps). Defaults to "contained" . | string |
size | The size of the button (within displayProps). Can be "small" , "medium" , or "large" . | string |
readOnly | A readonly field is not editable and value cannot be changed | boolean |
className | A 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"
}
}
]