Skip to main content
Version: Next

OCIllustrationCard: UI Component

The OCIllustrationCard component is a reusable IllustrationCard that allows you to create customizable IllustrationCard by setting with image type, title, description and button.

Features

  • Create IllustrationCard.
  • Customize image type, title, description and button.

Installation

  1. Copy the IllustrationCard component folder into your Xcode project.

  2. Use the OCIllustrationCard view in your SwiftUI code:

Parameters:

  • imageType : Display image with different type like Local and URL.
  • title : Title of Illustration card
  • description : Description of Illustration card
  • buttonText : Display button in Illustration card
  • style : The appearance of the card can be customized using different background and text color
import SwiftUI

struct ContentView: View {

var body: some View {
VStack {
OCIllustrationCard(imageType: .local(image: Image("OnboardCardViewPlaceholder"),
title: "Title",
description: "Description",
buttonText: "Button",
style: .blue)
}.padding()
}
}