You can configure a solid color, gradient color, image padding box, or a combination of them.
Fields
Field | Description | Type | Required | Remarks |
---|---|---|---|---|
name |
The name of the control. | string | Yes | None |
type |
The type of the control. | string | Yes | None |
default |
The default value. | string or object | No | If this field is not specified, it is left empty. For more information, see Values. |
components |
The type of the padding box. | array | No | The value can be flat, linearGradient, image, or a combination of them.
Note The settings vary based on the padding box type. For more information, see Values. |
Values
Condition | Data type | Example | Default value | Remarks |
---|---|---|---|---|
Solid color padding box | string | "#333" |
"#000" |
None |
Gradient color padding box | object |
|
|
None |
Image padding box | object |
|
|
None |
A combination of multiple padding box types | object |
|
|
|
Sample configurations
- Set the type field to
flat
"flat": { "name": "Solid Color", "type": "fill", "default": "#333" }
- Set the type field to
linearGradient
"linearGradient": { "name": "Linear Gradient Color", "type": "fill", "components": [ "linearGradient" ], "default": { "angle": 90, "stops": [ { "color": "#333", "offset": 0 }, { "color": "red", "offset": 100 } ] } }
- Set the type field set to
image
"image": { "name": "Image Padding", "type": "fill", "components": [ "image" ], "default": { "fillType": "cover", "url": "https://img.alicdn.com/tfs/TB16ag8v4z1gK0jSZSgXXavwpXa-96-96.png", "tileSize": 100 } }