UIView
Represents a single view inside a UI, similar to a div.
const view = app.create('uiview')view.backgroundColor = 'rgba(0, 0, 0, 0.5)'Properties
Section titled “Properties”.display: String
Section titled “.display: String”Either none or flex.
Defaults to flex.
.width: Number
Section titled “.width: Number”The width of the view in pixels. Defaults to 100.
.height: Number
Section titled “.height: Number”The height of the view in pixels. Defaults to 100.
.backgroundColor: String
Section titled “.backgroundColor: String”The background color of the view.
Can be hex (eg #000000) or rgba (eg rgba(0, 0, 0, 0.5)).
Defaults to null.
.borderWidth: Number
Section titled “.borderWidth: Number”The width of the border in pixels.
.borderColor: String
Section titled “.borderColor: String”The color of the border.
.borderRadius: Number
Section titled “.borderRadius: Number”The radius of the border in pixels.
.margin: Number
Section titled “.margin: Number”The outer margin of the view in pixels.
Defaults to 0.
.padding: Number
Section titled “.padding: Number”The inner padding of the view in pixels.
Defaults to 0.
.flexDirection: String
Section titled “.flexDirection: String”The flex direction. column, column-reverse, row or row-reverse.
Defaults to column.
.justifyContent: String
Section titled “.justifyContent: String”Options: flex-start, flex-end, center.
Defaults to flex-start.
.alignItems: String
Section titled “.alignItems: String”Options: stretch, flex-start, flex-end, center, baseline.
Defaults to stretch.
.alignContent: String
Section titled “.alignContent: String”Options: flex-start, flex-end, stretch, center, space-between, space-around, space-evenly.
Defaults to flex-start.
.flexBasis: Number
Section titled “.flexBasis: Number”Defaults to null.
.flexGrow: Number
Section titled “.flexGrow: Number”Defaults to null.
.flexShrink: Number
Section titled “.flexShrink: Number”Defaults to null.
.flexWrap: String
Section titled “.flexWrap: String”Options: no-wrap, wrap.
Defaults to no-wrap.
.gap: Number
Section titled “.gap: Number”Defaults to 0.
.{...Node}
Section titled “.{...Node}”Inherits all Node properties