Components/Food/Restaurant Card
Restaurant Card

Restaurant Card

NFrom Nibware

A restaurant card with rating and delivery info.

Food · 36 lines · SwiftUI · iOS 17+

The actual source

RestaurantCard.swift
import SwiftUI

let fdOrange = Color(red: 0.98, green: 0.45, blue: 0.15)

let fdGreen = Color(red: 0.13, green: 0.66, blue: 0.40)

extension View {
    func fdMedia(_ w: CGFloat) -> some View {
        self.frame(width: w)
            .background(Color(.systemBackground), in: RoundedRectangle(cornerRadius: 18, style: .continuous))
            .clipShape(RoundedRectangle(cornerRadius: 18, style: .continuous))
            .overlay(RoundedRectangle(cornerRadius: 18, style: .continuous).stroke(Color.primary.opacity(0.06), lineWidth: 1))

Images this component uses

The code references this image by name. Download and drag into your Xcode Asset Catalog, keeping the same name, and the component renders exactly like the preview. Or swap in your own.

What it needs

Self-contained SwiftUI - system materials, SF Symbols, no external dependencies. Everything it needs - tokens, sub-views, models - is carried in the copy-paste source above.