View Source Label

<Label>

A title and icon pair.

Overview

Use the title and icon children to create a label.

<Label>
    <Text template={:title}>John Doe</Text>
    <Image template={:icon} systemName="person.crop.circle.fill" />
</Label>

When using a symbol as the icon, use the systemImage attribute.

<Label systemImage="person.crop.circle.fill">
    <Text>John Doe</Text>
</Label>

Attributes

SwiftUI Documentation

See SwiftUI.Label for more details on this View.

References

A symbol to use for the icon.

Discussion

This attribute takes precedence over the icon child. This is equivalent to the systemName attribute on Image.