Box
Box
is the most abstract component on which all other components are built. By default, it renders a div
element.
This is the Box
<Box p="md" bg="bg.contrast" color="fg.contrast">
This is the Box
</Box>
Usage
import { Box } from "@yamada-ui/react"
import { Box } from "@/components/ui"
import { Box } from "@workspaces/ui"
<Box />
Render a different element
By passing as
, you can render it as a different element.
<Box as="section" p="md" bg="bg.contrast" color="fg.contrast">
This is the section
</Box>