useToken is a custom hook used to resolve design tokens from the theme.


import { useToken } from "@chakra-ui/react"

Return value#

The useToken hook retrieves whatever is in the theme at the given path(s).


You can utilize useToken to create a boxShadow with colors from your theme.
Editable Example

Note that you can also use the sx prop to write styles freely using themes tokens.

Proudly made inNigeria by Segun Adebayo