SweetUI

Search items

Jump to an item

component

item

Composes content row: media, title, description, accessory; selection at call site.

itemrowlistcellmediashadcn
item, light

On iPad

The same installed source at a regular width. It adapts its layout without a separate design.

item on iPad, light

Install

With the sweetui tool (brew install mangobyte-dev/tap/sweetui):

sweetui install item --destination Sources/YourFeature/Components

Installs in order: avatar 0.2.1, separator 0.2.1, badge 0.3.2, item 0.2.2. Point --destination at a folder inside the consuming target's sources.

Usage

ItemRow(
    title: Text("Statement ready"),
    description: Text("August 2026")
) {
    Avatar(initials: "ST", accessibilityLabel: Text("Statements"))
} accessory: {
    Text("New").registryBadge()
}

// Media only: the bare trailing closure is the media; name accessory: to add a trailing accessory.
ItemRow(title: Text("Mishmash Bakery"), description: Text("Card payment")) {
    Avatar(initials: "MB", accessibilityLabel: Text("Mishmash Bakery"))
}

Accessibility contract

  • Title+description: one element; media/accessory separate, activatable.
  • Selection: Button/NavigationLink, call site, combines row, label.
  • Keeps 44-point min height, rectangular shape.
  • System styles, spacing tokens; description wraps, not truncates.
  • Switch: row in Toggle's label, spoken once. labelsHidden accessory MUST restore its label.

Details

Kindcomponent
Version0.2.2
PlatformsiOS 26.0+
Dependenciesavatar, separator, badge
SourceRegistry/sources/components/ItemRow.swift
Xcode previewItem Row