label

abstract fun label(content: @Composable () -> Unit): LineBuilder

Specifies a composable to use as the label for the line. In most cases this should be a Note or Label composable.

The label will be placed on top of the line. The width of the label depends on what kind of line this is:

  • If this is a line to the same participant (i.e. a cycle) or a line between two adjacent Participants, the label is measured to the maximum intrinsic width of everything sharing its column and a zero minimum width.

  • Otherwise, the line spans multiple Participants, and the label is measured with the fixed width equal to the distance between those participants' lines.

Sources

Link copied to clipboard