Class: Box

html.Box

Class representing a box.

A box is a container item that holds and layouts child items.

new html.Box ()

Properties:
Name Type Description
borderColor html.Color

(default: "black") The color of the border.

borderRadius number

(default: 0) The border radius. The higher the value, the more round the corners are. A square with a border radius of half its width is a circle.

borderStyle number

(default: solid) The style of the border: solid|dotted|dashed

borderWidth number

(default: 0) The border width.

color html.Color

(default: "transparent") The background color.

gradient string

(default: "") The color gradient expression.

layout string

(default: "column") The layout method for inlined children: row|column|center|center-row|center-column

overflowBehavior string

(default: "none") The overflow behavior: none|wrap|scroll

scrollbars bool

(default: false) Whether to show native scrollbars for content overflow.

Extends

Methods

add (child, beforeChild) overrides

Adds a child element to the box.

Name Type Description
child html.Object

The child item.

beforeChild html.Object

An optional child item before which to insert the child.

updateLayout ()

Sets the CSS properties for layouting children.