Package-level declarations

Functions

Link copied to clipboard
inline fun Style.alignSelf(align: YogaAlign): Style

Defines how a child should be aligned with a Row or Column, overriding the parent's align-items property for this child.

Link copied to clipboard
inline fun Style.aspectRatio(aspectRatio: Float): Style

Defines an aspect ratio for this component, meaning the ratio of width to height. This means if aspectRatio is set to 2 and width is calculated to be 50px, then height will be 100px.

Link copied to clipboard
inline fun Style.border(border: Border): Style

Describes how a Border should be drawn around this component. Setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.

Link copied to clipboard
inline fun Style.flex(grow: Float? = null, shrink: Float? = null, basis: Dimen? = null, basisPercent: Float? = null): Style

Flex allows you to define how this component should take up space within its parent. It's comprised of the following properties:

Link copied to clipboard
inline fun Style.gap(column: Dimen? = null, row: Dimen? = null, all: Dimen? = null): Style

Gap will add spacing between the rows and columns of a flex container. You can specify if you want the gaps to be between only the rows, only the columns, or both.

Link copied to clipboard
inline fun Style.isReferenceBaseline(isReferenceBaseline: Boolean): Style
Link copied to clipboard
inline fun Style.layoutDirection(layoutDirection: YogaDirection): Style

Describes the RTL/LTR direction of component. Determines whether {@link YogaEdge#START} and {@link YogaEdge#END} will resolve to the left or right side, among other things. INHERIT indicates this setting will be inherited from this component's parent. Setting this property will cause the Component to be represented as a View at mount time if it wasn't going to already.

Link copied to clipboard
inline fun Style.marginAuto(edge: YogaEdge): Style

Sets margin value for specified edge to auto. The item will extend the margin for this edge to occupy the extra space in the parent, depending on the direction (Row or Column).

Link copied to clipboard
inline fun Style.position(all: Dimen? = null, horizontal: Dimen? = null, vertical: Dimen? = null, start: Dimen? = null, top: Dimen? = null, end: Dimen? = null, bottom: Dimen? = null, left: Dimen? = null, right: Dimen? = null): Style

Used in conjunction with positionType to define how a component should be positioned in its parent.

Link copied to clipboard
inline fun Style.positionPercent(all: Float? = null, horizontal: Float? = null, vertical: Float? = null, start: Float? = null, top: Float? = null, end: Float? = null, bottom: Float? = null, left: Float? = null, right: Float? = null): Style

Used in conjunction with positionType to define how a component should be positioned in its parent, with a float value between 0 and 100.

Link copied to clipboard
inline fun Style.positionType(positionType: YogaPositionType): Style

See docs in position.

Link copied to clipboard
inline fun Style.useHeightAsBaseline(useHeightAsBaseline: Boolean): Style