FlexBasis

sealed class FlexBasis(source)

Represents the flex-basis value, which can be auto, an explicit size, or a percentage.

Inheritors

Types

Link copied to clipboard
data object Auto : FlexBasis

The item's natural (max-content) size along the main axis is used as the flex basis. Mirrors CSS flex-basis: auto.

Link copied to clipboard
data class Percentage(val fraction: Float) : FlexBasis

A fraction of the container's main axis size used as the flex basis. E.g. Percentage(0.5f) = 50% of the container width (row) or height (column). Falls back to Auto behaviour when the container is unconstrained. Mirrors CSS flex-basis: <percentage>.

Link copied to clipboard
data class Size(val value: Float) : FlexBasis

An explicit pixel size used as the flex basis. Mirrors CSS flex-basis: <length>.