Skip to main content

LineHeight

Overrides the default line height inherited by descendent Text components.

Introduced in Kontakt 8.11.

modifier LineHeight
import { LineHeight, Text, VStack } from ui

export var main = VStack {
Text("Default\nline height")

VStack {
Text("Increased\nline height")
} with {
LineHeight(1.5)
}
}

Constructors

(_ factor)

_ factor: Float?

An optional line height factor. For example, 1.5 results in 150% of the font's natural line height. To let text inherit the default line height defined above this modifier provide nil.