Object

CornerMask

The object for creating rounded corners.

Properties

bottomLeft
boolean

A Boolean that indicates whether the bottom-left corner should be masked.

bottomRight
boolean

A Boolean that indicates whether the bottom-right corner should be masked.

radius
*

A supported unit or integer that describes the radius of the corners in points. Corner radius cannot exceed half the component width or height, whichever is smaller.

topLeft
boolean

A Boolean that indicates whether the top-left corner should be masked.

topRight
boolean

A Boolean that indicates whether the top-right corner should be masked.

type
string

The type of mask. The value is always corners.

Discussion

Use the CornerMask object to specify the corner radius for a component, and enable or disable the effect on a per-corner basis (topRight, topLeft, bottomRight, and bottomLeft). All corners are enabled by default. When you specify a border alongside a corner radius, the borders take into account the radius of the mask and are drawn within the unmasked area of the component.

This object can be used in ComponentStyle.

Example

{ "components": [ { "role": "container", "style": "exampleComponentStyle", "components": [ { "role": "title", "text": "Drought" } ] } ], "componentStyles": { "exampleComponentStyle": { "backgroundColor": "#FF0000", "mask": { "type": "corners", "radius": 25, "topRight": false, "bottomRight": false } } }}

See Also

Component Style Basics

Defining a Component Style

Set style options for the components in your article.

object ComponentStyle

The object for setting style properties for components, including background color and fill, borders, and table styles.

object Border

The object for setting borders for component sides or tables.

object StrokeStyle

The object for defining the color, width, and style of a border or divider.