The Box
component is a layout primitive that can be used to create any kind of layout.
It is just a div
with some styles.
1const before = <Box bg={"red"} /> 2 3const after = <div className="d0" />
1const before = <Box bg={"red"} /> 2 3const after = <div className="d0" />
You can use the as
prop to change the element type.
1const before = <Box as={"span"} /> 2 3const after = <span className="d0" />
1const before = <Box as={"span"} /> 2 3const after = <span className="d0" />