Components/Pricing/Plan Cards + Student
Plan Cards + Student

Plan Cards + Student

NFrom Nibware

Monthly/annual plan cards with a best-value badge and a student option.

Pricing · 26 lines · SwiftUI · iOS 17+

The actual source

PlanCardsStudent.swift
import SwiftUI

func prButton(_ label: String, bg: Color, fg: Color = .white, radius: CGFloat = 12, size: CGFloat = 16) -> some View {
    Text(label).font(.system(size: size, weight: .semibold)).foregroundStyle(fg).frame(maxWidth: .infinity).padding(.vertical, 15).background(bg, in: RoundedRectangle(cornerRadius: radius, style: .continuous))
}

/// DoorDash - "Choose your plan": monthly (selected) / annual best-value / student cards + CTA.
struct PricingDoorDash: View {
    let red = Color(red: 0.92, green: 0.09, blue: 0.0)
    let green = Color(red: 0.16, green: 0.62, blue: 0.32)
    var body: some View {
        VStack(alignment: .leading, spacing: 12) {

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.