useColorModeValue | NativeBase | Universal Components for React and React Native

Search
K
Hire us
Please opt in to our enterprise plan (coming soon) for priority support with NativeBase. If you are starting a new project, we recommend using gluestack-ui. For your existing projects, you can utilize @gluestack-ui/themed-native-base (beta).
useColorModeValue
useColorModeValue is a custom hook used to get a value from either of the parameters passed based on active color mode value.
Import
Copy
import { useColorModeValue } from 'native-base';
Example
Playground
Return value
Accepts 2 parameters and returns either of the two, based on current color-mode (first parameter for light mode and second parameter for dark mode).
Nativebase logo
MadeWithNativeBase