Material Design’s text sizes and styles were developed to balance content density and reading comfort under typical usage conditions.
npm install @rmwc/typographyMaterial Design’s text sizes and styles were developed to balance content density and reading comfort under typical usage conditions.
- Module @rmwc/typography
- Import styles:
- Using CSS Loader
- import '@rmwc/typography/styles';
- Or include stylesheets
- '@material/typography/dist/mdc.typography.css'
- MDC Docs: https://material.io/develop/web/components/typography/
``jsx`
<>
>
`jsx`
headline6
You can globally map specify type classes to HTML tags for semantics, or specify a default to be used instead of span.
` For backwards compatible typography tags, you can import and use | Name | Type | Description |jsx
/* Make all Typography components default to /
defaultTag: 'div',
/* Make headline5
/
headline5: 'h5',
/* Make body2
body2: 'p',
/* Use your own component /
body1: ({ children, ...rest }) => (
{children}!!!
)
}}
>
`typographyDefaults from @rmwc/provider.`jsxspan
span
span
`useTypography
The Typography Component$3
|------|------|-------------|
| | TypographyT` | The typography style. |