Theme is one core elements of NativeBase. And the extent of customising you can bring to your application by updating it, is only limited your imagination. NativeBase theme is complex object which looks like
It have many other properties but in this recipe, well only few of them (namely colors, fonts, and config) and well update it using NativeBase's
extendTheme function, we can update theme object. A simple example to illustrate the process of updating the theme.
In the above example, the following changes have been made:
- Added a new color named primary.
- Updated one of the shade of amber color.
- Updated the initial color mode to dark. Default is light.
- Finally passed the new theme object to the NativeBaseProvider.