Skip to content
People Results preview
Rendered from the SwiftUI source on this page.

People Results

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

People search results with follow.

Inputs · SwiftUI · iOS 17

  • inputs
  • swiftui

The actual source

SearchPeople.swift
// People Results · syxUI · https://syxui.dev/components/search-people
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

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

// People results
struct SearchPeople: View {
    let people = [("person_1", "Amara Kelly", "@amara"), ("person_2", "James Wilson", "@jwilson"), ("person_4", "Arjun Patel", "@arjun")]
    var body: some View {
        VStack(spacing: 12) {
            ForEach(Array(people.enumerated()), id: \.offset) { _, p in
                HStack(spacing: 12) { Image(p.0).resizable().scaledToFill().frame(width: 44, height: 44).clipShape(Circle()); VStack(alignment: .leading, spacing: 2) { Text(p.1).font(.system(size: 15, weight: .semibold)); Text(p.2).font(.system(size: 13)).foregroundStyle(.secondary) }; Spacer(); Text("Follow").font(.system(size: 13, weight: .semibold)).foregroundStyle(.white).padding(.horizontal, 14).padding(.vertical, 6).background(seBlue, in: Capsule()) }
            }
        }.frame(width: 330)
    }
}
iOS 17 · 3 dependencies

Dependencies

SwiftUI
  • person_1 (image asset)
  • person_2 (image asset)
  • person_4 (image asset)

Requires iOS 17