Socket
Socket
Sign inDemoInstall

@material/react-typography

Package Overview
Dependencies
9
Maintainers
13
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @material/react-typography

Material Components React Typography


Version published
Weekly downloads
214
decreased by-42.32%
Maintainers
13
Install size
139 kB
Created
Weekly downloads
 

Readme

Source

React Typography

A React version of an MDC Typography.

Installation

npm install @material/react-typography

Usage

Styles

with Sass:

import '@material/react-typography/index.scss';

with CSS:

import '@material/react-typography/dist/typography.css';

Javascript Instantiation

import React from 'react';
import {
  Body1,
  Body2,
  Button,
  Caption,
  Headline1,
  Headline2,
  Headline3,
  Headline4,
  Headline5,
  Headline6,
  Overline,
  Subtitle1,
  Subtitle2,
} from '@material/react-typography';

class MyApp extends React.Component {
  render() {
    return (
      <React.Fragment>
        <Headline1>Kate Lockwell</Headline1>
        <Headline2>Jim Raynor</Headline2>
        <Headline3>Kerrigan</Headline3>
        <Headline4>Arcturus Mengsk</Headline4>
        <Headline5>Valerian Mengsk</Headline5>
        <Headline6>Donny Vermillion</Headline6>
        <Subtitle1>Kate Lochwell</Subtitle1>
        <Subtitle2>Jim Raynor</Subtitle2>
        <Body1>Kerrigan</Body1>
        <Body2>Arcturus Mengsk</Body2>
        <Caption>Valerian Mengsk</Caption>
        <Button>Donny Vermillion</Button>
        <Overline>Kate Lockwell</Overline>
      </React.Fragment>
    );
  }
}

Components

Headline1

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h1')

Headline2

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h2')

Headline3

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h3')

Headline4

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h4')

Headline5

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h5')

Headline6

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h6')

Subtitle1

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h6')

Subtitle2

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'h6')

Body1

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'p')

Body2

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'p')

Button

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'span')

Caption

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'span')

Overline

Props
Prop NameTypeDescription
childrenNodeA React node to render within the component. The text to display
classNameStringClasses to be applied to the root element
tagStringThe tag type to render (default 'span')

Sass Mixins

Sass mixins may be available to customize various aspects of the Components. Please refer to the MDC Web repository for more information on what mixins are available, and how to use them.

Advanced Sass Mixins

Keywords

FAQs

Last updated on 22 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc