Skip to content

Add Label support #1023

Closed
Closed

Description

@Kyle-Ye

Summary

Add public Label support for pairing a title with an icon in a style-aware view.

Scope

  • Add the generic Label API with title and icon builders.
  • Add common Text and Image convenience initializers, including system-image and named-image forms.
  • Integrate LabelStyle, style configuration, .labelStyle(_:), and the automatic, title-and-icon, title-only, and icon-only styles.
  • Preserve the title and icon content when labels are composed inside controls and containers.
  • Add examples and focused coverage for custom and convenience-initialized labels.

Acceptance criteria

  • A custom Label { ... } icon: { ... } compiles and renders both components.
  • Label("Title", systemImage: "star") renders through the supported image backend.
  • Standard label styles select the expected title and icon content.
  • Label content remains available to enclosing controls and accessibility processing.

API reference

Activity

  1. added
    type: feature
    area: text
    area: view
    on Aug 25, 2026
  2. self-assigned this
    on Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: textarea: viewtype: feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions