Backbencher.dev

How to Render Span Instead of Div in Material UI Box Element

Last updated on 18 Aug, 2021

Box element in Material UI by default renders div. We can pass a component property to render span.

<Box component="span" m="{1}">
  <button />
</Box>
--- ○ ---
Joby Joseph
Web Architect