Version: 3.0.0-next.38

useColorMode

useColorMode is a custom hook used to get and set the color mode.

Import#

import { useColorMode } from 'native-base';

Example#

Return#

NameTypeDescriptionDefault
colorModelight, darkThe active color modelight
setColorModefunctionUse to set color mode.-
toggleColorModefunctionUse to toggle between light and dark mode.-