useToken
useToken
is a custom hook for retrieving tokens from the theme.
Import
import { useToken } from "@yamada-ui/react"
Usage
Editable example
const bg = useToken("colors", "primary") return ( <Box bg={bg} p="md" rounded="md" color="white"> Primary for color tokens is "{bg}" </Box> )
If you want to learn more about themes, please check here.
Edit this page on GitHub