useColorModeValue | NativeBase | Universal Components for React and React Native

Search
K
Hire us
Data Display
Typography
Disclosure
Media and Icons
Others
If you are starting a new project, please try gluestack-ui for better performance and new design.
useColorModeValue
useColorModeValue is a custom hook that can retrieve a value from 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
Gluestack logo
gluestack-ui