# Theme

    public struct Theme

Template theme generating UI components for your layout

Show on GitHub

### Font colors

- `primaryFontColor`

  Font color associated with text displaying primary font colour, like inputs, titles and other important text

  #### Declaration

  Swift

      public var primaryFontColor: UIColor

  Show on GitHub
- `secondaryFontColor`

  Font color associated with text displaying secondary information, like subtitles and other non core text

  #### Declaration

  Swift

      public var secondaryFontColor: UIColor

  Show on GitHub
- `buttonFontColor`

  Font color associated with text displayed inside actionable buttons

  #### Declaration

  Swift

      public var buttonFontColor: UIColor

  Show on GitHub
- `errorFontColor`

  Font color associated with text

  #### Declaration

  Swift

      public var errorFontColor: UIColor

  Show on GitHub

### Font

- `headerFont`

  Font used for page headers

  #### Declaration

  Swift

      public var headerFont: UIFont

  Show on GitHub
- `titleFont`

  Font used for input sections titles

  #### Declaration

  Swift

      public var titleFont: UIFont

  Show on GitHub
- `subtitleFont`

  Font used for text displaying secondary information, like subtitles and other non core text

  #### Declaration

  Swift

      public var subtitleFont: UIFont

  Show on GitHub
- `inputFont`

  Font used for input fields where user is inputting the values

  #### Declaration

  Swift

      public var inputFont: UIFont

  Show on GitHub
- `buttonFont`

  Font used for buttons that the user will interact with

  #### Declaration

  Swift

      public var buttonFont: UIFont

  Show on GitHub

### UI Formatting colors

- `backgroundColor`

  Color used as background on screens

  #### Declaration

  Swift

      public var backgroundColor: UIColor

  Show on GitHub
- `textInputBackgroundColor`

  Color used as background for text input fields

  #### Declaration

  Swift

      public var textInputBackgroundColor: UIColor

  Show on GitHub
- `focussedTextInputBorderColor`

  Color used for border on text input field when its focussed

  #### Declaration

  Swift

      public var focussedTextInputBorderColor: UIColor

  Show on GitHub
- `borderColor`

  Color used for border around data input sections. Will require a borderWidth to be provided for border to be shown

  #### Declaration

  Swift

      public var borderColor: UIColor

  Show on GitHub
- `textInputBorderColor`

  Color used for border around text inputs. Will require a textInputBorderRadius to be provided for the border to be shown

  #### Declaration

  Swift

      public var textInputBorderColor: UIColor

  Show on GitHub
- `errorBorderColor`

  Color used for border when a validated field is receiving an error. Will be used by errorBorder or errorTextInputBorder as setup

  #### Declaration

  Swift

      public var errorBorderColor: UIColor

  Show on GitHub

### Border formatting

- `borderRadius`

  Border radius around data input sections

  #### Declaration

  Swift

      public var borderRadius: CGFloat

  Show on GitHub
- `borderWidth`

  Border width around data input sections

  #### Declaration

  Swift

      public var borderWidth: CGFloat

  Show on GitHub
- `textInputBorderRadius`

  Border radius around text input fields

  #### Declaration

  Swift

      public var textInputBorderRadius: CGFloat

  Show on GitHub
- `textInputBorderWidth`

  Border width around text input fields

  #### Declaration

  Swift

      public var textInputBorderWidth: CGFloat

  Show on GitHub
- `errorBorderRadius`

  Border radius around data input sections when showing an error

  #### Declaration

  Swift

      public var errorBorderRadius: CGFloat

  Show on GitHub
- `errorBorderWidth`

  Border width around data input sections when showing an error

  #### Declaration

  Swift

      public var errorBorderWidth: CGFloat

  Show on GitHub
- `errorTextInputBorderRadius`

  Border radius around text input fields when showing an error

  #### Declaration

  Swift

      public var errorTextInputBorderRadius: CGFloat

  Show on GitHub
- `errorTextInputBorderWidth`

  Border width around text input fields when showing an error

  #### Declaration

  Swift

      public var errorTextInputBorderWidth: CGFloat

  Show on GitHub
- `init(primaryFontColor:secondaryFontColor:buttonFontColor:errorFontColor:backgroundColor:errorBorderColor:)`

  Undocumented

  #### Declaration

  Swift

      public init(primaryFontColor: UIColor,
                  secondaryFontColor: UIColor,
                  buttonFontColor: UIColor,
                  errorFontColor: UIColor,
                  backgroundColor: UIColor,
                  errorBorderColor: UIColor)

  Show on GitHub
- `ThemeBillingCountryInput`

  Theme generated Billing Country Input Style

  See more

  #### Declaration

  Swift

      struct ThemeBillingCountryInput : CellButtonStyle

  Show on GitHub
- `buildBillingCountryInput(button:title:mandatory:subtitle:error:)`

  Create a Billing Country Input from provided themed components

  #### Declaration

  Swift

      func buildBillingCountryInput(button: CountryListButton,
                                    title: ThemeTitle,
                                    mandatory: ThemeMandatory? = nil,
                                    subtitle: ThemeSubtitle? = nil,
                                    error: ThemeError? = nil) -> ThemeBillingCountryInput

  Show on GitHub
- `buildBillingCountryInput(buttonText:buttonImage:title:subtitle:subtitleImage:isRequiredText:errorText:errorImage:)`

  Create a Billing Country Input from provided content

  #### Declaration

  Swift

      func buildBillingCountryInput(buttonText: String,
                                    buttonImage: UIImage? = nil,
                                    title: String,
                                    subtitle: String = "",
                                    subtitleImage: UIImage? = nil,
                                    isRequiredText: String = "",
                                    errorText: String = "",
                                    errorImage: UIImage? = nil) -> ThemeBillingCountryInput

  Show on GitHub
- `ThemeBillingForm`

  Theme generated Billing Form Style

  See more

  #### Declaration

  Swift

      struct ThemeBillingForm : BillingFormStyle

  Show on GitHub
- `buildBillingForm(header:cells:)`

  Create a Billing Form from Styles defined for each sub component

  #### Declaration

  Swift

      func buildBillingForm(header: ThemeBillingHeader,
                            cells: [BillingFormCell]) -> ThemeBillingForm

  Show on GitHub
- `ThemeBillingHeader`

  Theme generated Billing Header Style

  See more

  #### Declaration

  Swift

      struct ThemeBillingHeader : BillingFormHeaderCellStyle

  Show on GitHub
- `buildBillingHeader(label:cancelButton:doneButton:)`

  Create a Billing Header from provided themed components

  #### Declaration

  Swift

      func buildBillingHeader(label: ElementStyle,
                              cancelButton: ElementButtonStyle,
                              doneButton: ElementButtonStyle) -> ThemeBillingHeader

  Show on GitHub
- `buildBillingHeader(title:cancelButtonTitle:doneButtonTitle:)`

  Create a Billing Header from provided content

  #### Declaration

  Swift

      func buildBillingHeader(title: String,
                              cancelButtonTitle: String,
                              doneButtonTitle: String) -> ThemeBillingHeader

  Show on GitHub
- `ThemeBillingInput`

  Theme generated Billing Input Style

  See more

  #### Declaration

  Swift

      struct ThemeBillingInput : CellTextFieldStyle

  Show on GitHub
- `buildBillingInput(textField:isMandatory:title:mandatory:subtitle:error:)`

  Create a Billing Input from provided themed components

  #### Declaration

  Swift

      func buildBillingInput(textField: ThemeTextField,
                             isMandatory: Bool,
                             title: ThemeTitle,
                             mandatory: ThemeMandatory? = nil,
                             subtitle: ThemeSubtitle? = nil,
                             error: ThemeError? = nil) -> ThemeBillingInput

  Show on GitHub
- `buildBillingInput(text:placeholder:isNumericInput:isMandatory:title:subtitle:subtitleImage:isRequiredText:errorText:errorImage:)`

  Create a Billing Input from provided content

  #### Declaration

  Swift

      func buildBillingInput(text: String,
                             placeholder: String = "",
                             isNumericInput: Bool,
                             isMandatory: Bool,
                             title: String,
                             subtitle: String = "",
                             subtitleImage: UIImage? = nil,
                             isRequiredText: String = "",
                             errorText: String = "",
                             errorImage: UIImage? = nil) -> ThemeBillingInput

  Show on GitHub
- `ThemeBorderStyle`

  Undocumented

  See more

  #### Declaration

  Swift

      struct ThemeBorderStyle : ElementBorderStyle

  Show on GitHub
- `NavigationButtonStyle`

  Theme generated navigation button Style

  See more

  #### Declaration

  Swift

      struct NavigationButtonStyle : ElementButtonStyle

  Show on GitHub
- `CountryListButton`

  Theme generated Button Style for showing Country Selection to user

  See more

  #### Declaration

  Swift

      struct CountryListButton : ElementButtonStyle

  Show on GitHub
- `buildNavigationButton(text:)`

  Create a navigation button style with the provided title

  #### Declaration

  Swift

      func buildNavigationButton(text: String) -> NavigationButtonStyle

  Show on GitHub
- `buildCountryListButton(text:image:)`

  Create a button for launching a Country selection journey

  #### Declaration

  Swift

      func buildCountryListButton(text: String,
                                  image: UIImage? = nil) -> CountryListButton

  Show on GitHub
- `ThemeError`

  Theme generated Error style

  See more

  #### Declaration

  Swift

      struct ThemeError : ElementErrorViewStyle

  Show on GitHub
- `buildError(text:image:)`

  Create an Error Style from text and optional image

  #### Declaration

  Swift

      func buildError(text: String,
                      image: UIImage? = nil) -> ThemeError

  Show on GitHub
- `ThemeMandatory`

  Theme generated Mandatory style

  See more

  #### Declaration

  Swift

      struct ThemeMandatory : ElementStyle

  Show on GitHub
- `buildIsRequiredInput(text:)`

  Create a Mandatory Style from text

  #### Declaration

  Swift

      func buildIsRequiredInput(text: String) -> ThemeMandatory

  Show on GitHub
- `ThemePageHeaderTitle`

  Theme generated Page Header Title

  See more

  #### Declaration

  Swift

      struct ThemePageHeaderTitle : ElementStyle

  Show on GitHub
- `buildPageHeaderTitle(text:)`

  Create a Page Form Header Title from given text

  #### Declaration

  Swift

      func buildPageHeaderTitle(text: String) -> ThemePageHeaderTitle

  Show on GitHub
- `ThemeSubtitle`

  Theme generated Subtitle style

  See more

  #### Declaration

  Swift

      struct ThemeSubtitle : ElementStyle

  Show on GitHub
- `buildSubtitle(text:image:)`

  Create a Subtitle Style from text and optional image

  #### Declaration

  Swift

      func buildSubtitle(text: String,
                         image: UIImage? = nil) -> ThemeSubtitle

  Show on GitHub
- `ThemeTextField`

  Theme generated TextField style

  See more

  #### Declaration

  Swift

      struct ThemeTextField : ElementTextFieldStyle

  Show on GitHub
- `buildTextField(text:placeholderText:isNumericInput:)`

  Create a TextField Style from text

  #### Declaration

  Swift

      func buildTextField(text: String,
                          placeholderText: String,
                          isNumericInput: Bool) -> ThemeTextField

  Show on GitHub
- `ThemeTitle`

  Theme generated Title style

  See more

  #### Declaration

  Swift

      struct ThemeTitle : ElementStyle

  Show on GitHub
- `buildTitle(text:)`

  Create a Title Style from text

  #### Declaration

  Swift

      func buildTitle(text: String) -> ThemeTitle

  Show on GitHub
- `ThemeAddBillingSectionButton`

  Theme generated Add Billing Section Button Style

  See more

  #### Declaration

  Swift

      struct ThemeAddBillingSectionButton : CellButtonStyle

  Show on GitHub
- `ThemeBillingButton`

  Theme generated Add Billing Button Styile

  See more

  #### Declaration

  Swift

      struct ThemeBillingButton : ElementButtonStyle

  Show on GitHub
- `buildAddBillingSectionButton(text:isBillingAddressMandatory:titleText:subtitleText:subtitleImage:mandatoryText:errorText:errorImage:)`

  Create an Add Billing Section Button from Styles from core information

  #### Declaration

  Swift

      func buildAddBillingSectionButton(text: String,
                                        isBillingAddressMandatory: Bool,
                                        titleText: String,
                                        subtitleText: String = "",
                                        subtitleImage: UIImage? = nil,
                                        mandatoryText: String = "",
                                        errorText: String = "",
                                        errorImage: UIImage? = nil) -> ThemeAddBillingSectionButton

  Show on GitHub
- `buildAddBillingSectionButton(buttonStyle:isBillingAddressMandatory:title:subtitle:isRequiredText:error:)`

  Create an Add Billing Section Button from Styles defined for each component

  #### Declaration

  Swift

      func buildAddBillingSectionButton(buttonStyle: ThemeBillingButton,
                                        isBillingAddressMandatory: Bool,
                                        title: ThemeTitle,
                                        subtitle: ThemeSubtitle?,
                                        isRequiredText: ThemeMandatory?,
                                        error: ThemeError?) -> ThemeAddBillingSectionButton

  Show on GitHub
- `buildBillingButton(text:)`

  Create an Add Billing Button from using theme and text

  #### Declaration

  Swift

      func buildBillingButton(text: String) -> ThemeBillingButton

  Show on GitHub
- `ThemeBillingSummary`

  Theme generated Billing Summary Style

  See more

  #### Declaration

  Swift

      struct ThemeBillingSummary : BillingSummaryViewStyle

  Show on GitHub
- `ThemeSummaryElement`

  Theme generated Summary Content Style

  See more

  #### Declaration

  Swift

      struct ThemeSummaryElement : ElementStyle

  Show on GitHub
- `ThemeBillingModifyButton`

  Theme generated Billing Modify Button Style

  See more

  #### Declaration

  Swift

      struct ThemeBillingModifyButton : CellButtonStyle

  Show on GitHub
- `buildBillingSummary(button:textField:title:mandatory:subtitle:error:)`

  Create a Billing Summary from Styles defined for each sub component

  #### Declaration

  Swift

      func buildBillingSummary(button: ElementButtonStyle,
                               textField: ThemeTextField,
                               title: ThemeTitle,
                               mandatory: ThemeMandatory?,
                               subtitle: ThemeSubtitle?,
                               error: ThemeError) -> ThemeBillingSummary

  Show on GitHub
- `buildBillingSummary(buttonText:titleText:subtitleText:subtitleImage:isRequiredText:errorText:errorImage:)`

  Create a Billing Summary from provided content

  #### Declaration

  Swift

      func buildBillingSummary(buttonText: String,
                               titleText: String,
                               subtitleText: String = "",
                               subtitleImage: UIImage? = nil,
                               isRequiredText: String = "",
                               errorText: String = "",
                               errorImage: UIImage? = nil) -> ThemeBillingSummary

  Show on GitHub
- `ThemePaymentInput`

  Theme generated Payment Input section

  See more

  #### Declaration

  Swift

      struct ThemePaymentInput : CellTextFieldStyle

  Show on GitHub
- `buildCardNumberSection(textField:title:mandatory:subtitle:error:)`

  Create a Payment Input Section from Styles defined for each sub component

  #### Declaration

  Swift

      func buildCardNumberSection(textField: ThemeTextField,
                                  title: ThemeTitle,
                                  mandatory: ThemeMandatory?,
                                  subtitle: ThemeSubtitle?,
                                  error: ThemeError) -> ThemePaymentInput

  Show on GitHub
- `buildPaymentInput(textFieldText:textFieldPlaceholder:isTextFieldNumericInput:titleText:subtitleText:subtitleImage:isRequiredInputText:errorText:errorImage:)`

  Create a Payment Input Section from basic input data for presentation

  #### Declaration

  Swift

      func buildPaymentInput(textFieldText: String = "",
                             textFieldPlaceholder: String = "",
                             isTextFieldNumericInput: Bool,
                             titleText: String,
                             subtitleText: String = "",
                             subtitleImage: UIImage? = nil,
                             isRequiredInputText: String = "",
                             errorText: String = "",
                             errorImage: UIImage? = nil) -> ThemePaymentInput

  Show on GitHub
- `ThemePayButton`

  Theme generated Pay Button

  See more

  #### Declaration

  Swift

      struct ThemePayButton : ElementButtonStyle

  Show on GitHub
- `buildPayButton(text:image:)`

  Create a button for ending the Payment journey and attempting to tokenise inputs

  #### Declaration

  Swift

      func buildPayButton(text: String,
                          image: UIImage? = nil) -> ThemePayButton

  Show on GitHub
- `ThemePaymentForm`

  Theme generated payment form

  See more

  #### Declaration

  Swift

      struct ThemePaymentForm : PaymentFormStyle

  Show on GitHub
- `buildPaymentForm(headerView:addBillingButton:billingSummary:cardholder:cardNumber:expiryDate:securityCode:payButton:)`

  Create a Payment Form from the provided Styles for each section

  #### Declaration

  Swift

      func buildPaymentForm(headerView: PaymentHeaderCellStyle,
                            addBillingButton: CellButtonStyle?,
                            billingSummary: BillingSummaryViewStyle?,
                            cardholder: CellTextFieldStyle?,
                            cardNumber: CellTextFieldStyle,
                            expiryDate: CellTextFieldStyle,
                            securityCode: CellTextFieldStyle?,
                            payButton: ElementButtonStyle) -> ThemePaymentForm

  Show on GitHub
- `ThemePaymentHeader`

  Theme generated Payment Header for the Payment Form

  See more

  #### Declaration

  Swift

      struct ThemePaymentHeader : PaymentHeaderCellStyle

  Show on GitHub
- `buildPaymentHeader(headerLabel:subtitleLabel:)`

  Create a Payment Form Header from given elements

  #### Declaration

  Swift

      func buildPaymentHeader(headerLabel: ElementStyle,
                              subtitleLabel: ElementStyle?) -> ThemePaymentHeader

  Show on GitHub
- `buildPaymentHeader(title:subtitle:)`

  Create a Payment Form Header with given text

  #### Declaration

  Swift

      func buildPaymentHeader(title: String,
                              subtitle: String) -> ThemePaymentHeader

  Show on GitHub
- `ThemePaymentHeaderSubtitle`

  Theme generated Payment Header View Subtitle for the Payment Form

  See more

  #### Declaration

  Swift

      struct ThemePaymentHeaderSubtitle : ElementStyle

  Show on GitHub
- `buildPaymentHeaderSubtitle(text:)`

  Create a Payment Form Header Subtitle from given text

  #### Declaration

  Swift

      func buildPaymentHeaderSubtitle(text: String) -> ThemePaymentHeaderSubtitle

  Show on GitHub