Text

The text component enables you to use Backpack defined text styles.

Backpack-SwiftUI/Text

Cocoapods class reference view on Github

Body

Day Night

Heading

Day Night

Hero

Day Night

Usage

BpkText


                                                
                                                import Backpack_SwiftUI
                                                
                                                BPKText("Hello world")
                                                
                                                BPKText("Hello world", style: .heading1)
                                                
                                                BPKText("Hello world")
                                                    .foregroundColor(.corePrimaryColor)
                                                    .lineLimit(2)

BpkAttributedText


                                                
                                                import Backpack_SwiftUI
                                                
                                                let items: [BPKAttributedText.Item] = [
                                                    .init("Default item, with .bodyDefault and .textPrimary "),
                                                    .init("With custom style ", style: .heading1),
                                                    .init("With custom color ", color: .corePrimaryColor),
                                                    .init("With custom everything ", style: .heading1, color: .corePrimaryColor)
                                                ]
                                                
                                                BPKAttributedText(items: items)