
Review Card
From syxUI — written for both platforms, not translated between them.
A testimonial card - avatar, star rating and a quote.
Cards · SwiftUI · iOS 17
- cards
- swiftui
The actual source
TestimonialCard.swift
// Review Card · syxUI · https://syxui.dev/components/card-review
// Free in any project. Keep this line and credit syxUI where a person can read it.
import SwiftUI
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)
}
}
// Review card
struct TestimonialCard: View {
var body: some View {
VStack(alignment: .leading, spacing: 10) {
HStack(spacing: 10) {
Image("person_3").resizable().scaledToFill().frame(width: 40, height: 40).clipShape(Circle())
VStack(alignment: .leading, spacing: 2) {
Text("Mia Chen").font(.system(size: 15, weight: .semibold))
HStack(spacing: 2) {
ForEach(0..<5, id: \.self) { _ in Image(systemName: "star.fill").font(.system(size: 11)).foregroundStyle(.orange) }
}
}
Spacer()
}
Text("\"Absolutely love this app. It's become part of my daily routine and the design is beautiful.\"")
.font(.system(size: 14)).foregroundStyle(.primary.opacity(0.85)).fixedSize(horizontal: false, vertical: true)
}.formaCard().frame(width: 300)
}
}
iOS 17 · 1 dependencies
Dependencies
- SwiftUI
- person_3 (image asset)
Requires iOS 17


