Typography span variant
See original GitHub issueBoth defaultHeadlineMapping variants body1 and body2 - p (paragraph) tag. Other variants are block-types too (h1-h6) and no one inline/inline-block.
I can do this by
component={(props) => {
return <span
{...props}
/>
}}
or
variant="body2"
headlineMapping={{
body2: 'span',
}}
But it’s not useful.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Typography span variant #13196 - mui/material-ui - GitHub
This is the #1 result for "material ui typography span inline text" and there is no accepted answer. There is nothing on Stack...
Read more >Typography API - Material UI - MUI
API reference docs for the React Typography component. ... The component maps the variant prop to a range of different HTML element types....
Read more >Material-UI Typography Tutorial and Examples | React.School
There are also overline and caption caption variants which are both smaller font sized <span> components. Typography Usage. The default <Typography> with no ......
Read more >How to make MUI Typography without newline? - Stack Overflow
So, as we all know "span" is an "inline" component and next element (if it ... To remove the newline in all Typography...
Read more >font-variant - CSS: Cascading Style Sheets - MDN Web Docs
The font-variant CSS shorthand property allows you to set all the font variants for a font.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is the #1 result for “material ui typography span inline text” and there is no accepted answer. There is nothing on Stack overflow for this question. You need to treat your community better
@kross-italk I think it’s kind of unfair to accuse us of treating our community badly considering how much time we spend answering questions and improving Material UI. Now to answer your question:
We changed
Typography
‘s implementation in v4 so it uses the default display for the element you choose i.e. inline for span. If you want to override this you can use thedisplay
prop e.g.display="inline"