border([border], [update])
Class: List. Method inherited from UIComponent.
Description:
Sets, updates, or gets component border object. Border object may contain only properties that you want to set.
See example for border object format.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
object |
Border object. See example for example of border object. |
|
|
boolean |
Set to |
Returns:
Type: this | Object
Examples:
// Border object format with all possible options:
{
style: string, // (Required) Valid values: `none`, `line`, `dashed`, `metal`, `etched_raised`, `etched_lowered`, `bevel_raised`, `bevel_lowered`, `soft_raised`, `soft_lowered`
size: number, // Border size in pixels (size >= 1).
padding: string, // Format: "top right bottom left". Example: "5 10 5 10". Padding can be set even for border of style `none`.
color: string, // Only for `line` or `dashed` border style.
rounded: boolean, // Set to `true` to make corners rounded in `line` style, or rounded dashes in `dashed` style. Only for `line` or `dashed` border style.
length: number, // Length of dashes for `dashed` style.
spacing: number, // Length of spaces between dashes in `dashed` style.
offset: number, // Offset of dashes from starting location. Can be used to animate dashes.
text: number, // Text to show at the top left of the border to make a titled border.
alignment: string // A string that defines where border text is placed. Valid words: "left", "center", "right", "leading", "trailing", "above", "below", "top", "bottom". Default is "top left". "above" and "below" means above the border line of below.
font: object // Font to use for the border text. For details about font object check example of font() method of this component.
}
