Version: 3.2.1

useColorModeValue

useColorModeValue is a custom hook used to get a value from either of the parameters passed based on active color mode value.

Import#

import { useColorModeValue } from 'native-base';

Example#

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).