Skip to content
Detail Row preview
Rendered from the SwiftUI source on this page.

Detail Row

From syxUI — written for both platforms, not translated between them.

A row with an icon, title and description.

Cards · SwiftUI · iOS 17

  • cards
  • swiftui

The actual source

MultilineRow.swift
// Detail Row · syxUI · https://syxui.dev/components/list-multiline
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

let listBlue = Color(red: 0.0, green: 0.47, blue: 1.0)

extension View {
    func formaCard(_ pad: CGFloat = 18) -> some View {
        self.padding(pad)
            .background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 20, style: .continuous))
            .overlay(RoundedRectangle(cornerRadius: 20, style: .continuous).stroke(Color.primary.opacity(0.06), lineWidth: 1))
            .shadow(color: .black.opacity(0.05), radius: 14, x: 0, y: 6)
    }
}

// Title + description row
struct MultilineRow: View {
    var body: some View {
        HStack(alignment: .top, spacing: 12) {
            Image(systemName: "sparkles").font(.system(size: 16)).foregroundStyle(listBlue).frame(width: 28, height: 28).background(listBlue.opacity(0.12), in: RoundedRectangle(cornerRadius: 8))
            VStack(alignment: .leading, spacing: 3) { Text("Smart Suggestions").font(.system(size: 15, weight: .semibold)); Text("Get personalized recommendations based on your recent activity and preferences.").font(.system(size: 13)).foregroundStyle(.secondary).fixedSize(horizontal: false, vertical: true) }
            Spacer(minLength: 0)
        }.formaCard(14).frame(width: 330)
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17