Box
Box
is the most abstract component on which all other components are built. By default, it renders a div
element.
Import
import { Box } from "@yamada-ui/react"
Usage
Editable example
<Box p="md" rounded="md" bg="primary" color="white"> This is the Box </Box>
Using as
By passing as
, you can render it as a different element or component.
Editable example
<Box as="button" p="md" rounded="md" bg="danger" color="white"> This is the button </Box>
Edit this page on GitHub