Skip to main content

API Reference

Theme Configuration

ColorConfig

KeyTypeDescription
colorsRecord<string, string>Define global colors

FontConfig

KeyTypeDescription
sizesnumber[]Define font sizes to generate associated style
colorsRecord<string, string>Define font colors to generate associated style

GuttersConfig

KeyTypeDescription
sizesnumber[]Define sizes to generate associated styles (padding and margin)

BordersConfig

KeyTypeDescription
widthsnumber[]Define sizes to generate associated styles (borderWidth)
radiusnumber[]Define radius to generate associated styles (borderRadius)
colorsRecord<string, string>Define colors to generate associated styles (borderColor)
KeyType
primarystring
backgroundstring
cardstring
textstring
borderstring
notificationstring

VariantsConfig

KeyType
fontsPick<FontConfig, 'colors'>
backgroundsRecord<string, string>
bordersPick<BordersConfig, 'colors'>
navigationColorsNavigationColorsConfig

Theme Types

Theme

KeyType
colorsall possible colors used through the configuration
variantdefault or string
layoutLayout
guttersGutters
fontsFonts
backgroundsBackgrounds
bordersBorders
navigationThemeNavigationTheme
componentsComponents

Layout

Static layout styles generated from the static/layout.ts file. The type of the generated styles is Record<string, ViewStyle> but will be inferred by the Layout type.

Gutters

Generated styles provided by the gutters section of the theme configuration assist in applying padding and margin to your components. The type of the generated styles is Record<string, ViewStyle> but will be inferred by the Gutters type.

Fonts

Combination of static and Generated styles provided by the fonts section of the theme configuration assist in applying font size and color to your components. The type of the generated styles is Record<string, TextStyle> but will be inferred by the Fonts type.

Backgrounds

Generated styles provided by the backgrounds section of the theme configuration assist in applying background color to your components. The type of the generated styles is Record<bg_${string}, {backGroundColor: string}> but will be inferred by the Backgrounds type.

Borders

Generated styles provided by the borders section of the theme configuration assist in applying border radius, width and color to your components. The type of the generated styles is Record<string, ViewStyle> but will be inferred by the Borders type.

Generated styles provided by the navigationColors section of the theme configuration assist in overriding ReactNavigation theme colors.

Components

Generated styles provided by the components file of the theme configuration assist in applying styles to specific components.