Skip to main content
.lineLimit(lines?: number): Component;

Parameters

lines
number
The maximum number of lines. If not specified, removes any existing line limit.

Support

Usage

Single line limit

Text("This is a very long text that will be truncated to one line")
    .lineLimit(1)

Three line limit

Text("This is a longer text that can span up to three lines before being truncated")
    .lineLimit(3)

Remove line limit

Text("This text has no line limit")
    .lineLimit()