UX Theming

The Lucra SDK theme can be overridden to make the sdk flows feel more inline with your core app design.

To override the default theme pass in a theme object containing the colors you wish to override to the LucraSDK initializer. You can override all or only some of the colors by just omiting the ones you want to use the defaults for.

For font overrides on Android you need to pass the font file name string. On iOS fonts are referenced by family name only. See example below:

LucraSDK.init({
  authenticationClientId: '<YOUR CLIENT ID>',
  environment: <LucraSDK.ENVIRONMENT>,
  theme: {
    primary: '#0935F',
    secondary: '#5E5BD0',
    tertiary: '#9C99FC',
    onPrimary: '#001448',
    onSecondary: '#FFFFFF',
    onTertiary: '#FFFFFF',
    fontFamily:
      Platform.OS === 'ios'
        ? 'Inter'
        : {
            normal: 'Inter-Regular',
            bold: 'Inter-Bold',
            semibold: 'Inter-SemiBold',
            medium: 'Inter-Medium',
          },
  },
});

Last updated