Theming native-base-web Apps
Customizing native-base-web themes is just the same way as NativeBase. But there is something you need to notice:
- Use themes/light.js from NativeBase to start theming. Don't use that one from
native-base-web, as we changed the theme object to a function which will not work in NativeBase when migrating code to workaround an issue. - In native-base-web projects, the value of
Platform.OSfromreact-native-web(-extended)is alwaysweb. So take care when modifying your copiedlight.js, as there are many conditions checkingPlatform.OSby default. - NativeBase provides both IOS and Android(material) themes, so does native-base-web. In your
PROJECT_ROOT/index.web.js, add the code below to choose one of them:
import { OSTheme } from 'native-base';
OSTheme.setOSTheme('android'); //Default: 'ios'
For detailed customizing guide, check out NativeBase official documentation.