Leave Yamada UI a star

Star
Yamada UIYamada UIv1.6.4

useToken

useToken is a custom hook for retrieving tokens from the theme.

Source@yamada-ui/use-token

Import

import { useToken } from "@yamada-ui/react"
Copied!

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>
)
Copied!

Edit this page on GitHub

PrevioususeTimeoutNextuseBreakpointEffect