Skip to content
Pricing FAQ preview
Rendered from the SwiftUI source on this page.

Pricing FAQ

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

A single accented FAQ block for pricing pages.

Accordions · SwiftUI · iOS 17

  • accordion
  • swiftui

The actual source

AccPricingFAQ.swift
// Pricing FAQ · syxUI · https://syxui.dev/components/acc-pricing-faq
// Free in any project. Keep this line and credit syxUI where a person can read it.

import SwiftUI

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

// Pricing FAQ with accent border
struct AccPricingFAQ: View {
    @State private var open = true
    var body: some View {
        VStack(alignment: .leading, spacing: 10) {
            HStack {
                Text("Do you offer a free trial?").font(.system(size: 15, weight: .semibold))
                Spacer()
                Image(systemName: "chevron.down").font(.system(size: 12, weight: .semibold)).foregroundStyle(accBlue).rotationEffect(.degrees(open ? 180 : 0))
            }
            if open { Text("Yes - every plan starts with a 14-day free trial. No credit card required, cancel anytime.").font(.system(size: 14)).foregroundStyle(.secondary).fixedSize(horizontal: false, vertical: true) }
        }
        .padding(16).frame(width: 330, alignment: .leading)
        .background(accBlue.opacity(0.05), in: RoundedRectangle(cornerRadius: 14, style: .continuous))
        .overlay(RoundedRectangle(cornerRadius: 14, style: .continuous).stroke(accBlue.opacity(0.25), lineWidth: 1))
    }
}
iOS 17 · No dependencies

Dependencies

SwiftUI
No external dependencies

Requires iOS 17