Build faster with Premium Chakra UI Components 💎
Search the docs
Features
sx
Theming
Layout
Forms
Data Display
Feedback
Typography
Overlay
Disclosure
Navigation
Media and icons
Others
Hooks
useTheme is a custom hook used to get the theme object from context.
useTheme
import { useTheme } from "@chakra-ui/react"
The useTheme hook returns the theme object.
function Example() { const theme = useTheme() return <div>{/* Do something with the theme */}</div>}
Previous
usePrefersReducedMotion
Next
useToken