I'm working with the Material-UI component library, and see the <Typography>
component used often. I've read the docs and here is the definition:
Use typography to present your design and content as clearly and efficiently as possible
I'm not sure why this just doesn't resonate with me but it doesn't and seems vague. I went on to read more of the docs, and I see it used in conjunction with elements like the following:
<Typography variant="h4" gutterBottom>
h4. Heading
</Typography>
Why not just use the following instead:
<h4>h4. Heading</h4>
I'm obviously missing the main use case and concept here and that's why I need some help in understand what exactly I use this for, so I'm not just copying and pasting components where I don't really understand their use. What is the use case for this component and why do I use it?
Like most React component libraries with a common UI/UX design language, Material-UI abstracts away many of the textual elements into a common component - Typography
. There are probably more reasons why this is done, but two of the larger ones that I'm aware of are:
Typography
components uniformly allowing you to maintain a common design language whereas using an h4
tag on its own will notYou can go to the Material Design website for more specifics on their design language. There, you can also read up on their rules for typography.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With