I want to create productised UI components library OOTB. so need help to build it

I want to build some UI components framework with some default functionality as Out-Of-The-Box. so clients can import that framework and customize the UI according to their needs.

Actually I want to build customisable UI components as Micro-UI components. Which actually gives the access to the clients/developers to customise.

For example, I want to create a Card component, it expects title and subtitle.

I want to return back Card component to customise in ContentView

Now I should create a card with some default UI and give the access to the card to the client to customize colours, fonts, and so on..

Here is some code:

import SwiftUI

typealias CardData = (title: String, subtitle: String)

struct ContentView: View {
    let item = (title: "Alex", subtitle: "Software engineer")
    var body: some View {
        Card(item) { view in
         // Here I should able to customise the card view, colours, fonts, corner-radius so on..

struct Card: View {
    var data: CardData
    var card: (Card) -> Void
    init(_ data: CardData, card: @escaping (Card) -> Void) {
        self.data = data
        self.card = card
    var body: some View {
        VStack {

At End of the day, its customers need to customize the UI, so I'm trying something like this, but not really got the clear idea yet how to do that.

Help would be greatly appreciated.