Border
Define a border style of an object.
| Property | Type | Required |
|---|---|---|
| class | string | Required |
| isEnabled | boolean | Required |
| color | Color | Optional |
| fillType | FillType | Required |
| position | BorderPosition | Required |
| thickness | number | Required |
| borderWeightsIndependent | boolean | Optional |
| topWeight | number | Optional |
| leftWeight | number | Optional |
| bottomWeight | number | Optional |
| rightWeight | number | Optional |
| contextSettings | GraphicsContextSettings | Required |
| gradient | Gradient | Optional |
| pattern | Pattern | Optional |
| style | integer | Required |
| dashedPattern | Array<number> | Required |
| dashedOffset | number | Required |
| lineCapStyle | LineCapStyle | Required |
| lineJoinStyle | LineJoinStyle | Required |
| miterLimit | number | Required |
| flat | number | Required |
thickness​
RequiredDescription
The thickness of the border.
This attribute only works if borderWeightsIndependent is set to false.
Type
number
borderWeightsIndependent​
OptionalDescription
For rectangles only. If true, independent border weights for all four sides.
Default value is false.
Type
boolean
topWeight​
OptionalDescription
This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the top of the rectangle. Default value is 0.
Type
number
leftWeight​
OptionalDescription
This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the left of the rectangle. Default value is 0.
Type
number
bottomWeight​
OptionalDescription
This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the bottom of the rectangle. Default value is 0.
Type
number
rightWeight​
OptionalDescription
This is used only when borderWeightsIndependent is set to true, in order to specify the border weight at the right of the rectangle. Default value is 0.
Type
number
contextSettings​
RequiredDescription
The opacity and blending-related configurations of the border.
style​
RequiredDescription
The type of the border style. The dashed style is further specified in dashedOffset and dashedPattern.
Type
integer
Value
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
0 | solid |
1 | dotted |
2 | dashed |
dashedPattern​
RequiredDescription
A list of values that describe the lengths of dashes (filled regions) and gaps (empty regions) in a dashed border by repeating themselves.
Type
Array<number>

dashedOffset​
RequiredDescription
Border dash initial offset. (applies to dashed borders)
If it is positive, it is offset to the left.
If it is negative, it is offset to the right.
Units: pixel.
Type
number
miterLimit​
RequiredDescription
When the angle between two adjacent border lines is less than this value, a miter join is used instead.
Type
number
flat​
RequiredDescription
The flatness parameter specifies the accuracy or smoothness with which curves are rendered as a sequence of flat line segments.
Default value is 0.
Type
number
Value
maximum: the value of this number must smaller than or equal to: 100
minimum: the value of this number must greater than or equal to: 0