useTheme | NativeBase | Universal Components for React and React Native

Search
K
Hire us
IMPORTANT MESSAGE — If you are starting a new project with NativeBase, we recommend using gluestack-ui instead.
Explore gluestack-ui
useTheme
useTheme is a custom hook used to get the theme object from context.
Import
Copy
import { useTheme } from 'native-base';
Example
Copy
function Example() {
const theme = useTheme();
return <Box>{/* Do something with the theme */}</Box>;
}
Quick Nav
Nativebase logo
MadeWithNativeBase