0.5.1 • Published 6 years ago

@slup/typography v0.5.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

This package contains the Typography, a Material Design Component which is part of a bigger ecosystem called Slup

Installation

This package can be installed with NPM

npm install --save @slup/typography

Usage

import { Typography } from '@slup/typography'

export class Test extends Component {
  render() {
    return <Typography display4>Text</Typography>
  }
}

Available properties

PropsTypeDefaultDocumentation
display1, 2, 3, 4booleanfalseLink
headlinebooleanfalseLink
titlebooleanfalseLink
subheadingbooleanfalseLink
body1, 2booleanfalseLink
captionbooleanfalseLink
buttonbooleanfalseLink

Property: 'display'

This property will set the font to the biggest possible

  • display4 = 112px light
  • display3 = 56px regular
  • display2 = 45px regular
  • display1 = 34px regular
<Typography display4>Text</Typography>
<Typography display3>Text</Typography>
<Typography display2>Text</Typography>
<Typography display1>Text</Typography>

Property: 'headline'

This property will set the text to look as a Headline

  • headline: 24px regular
<Typography headline>Text</Typography>

Property: 'title'

This property will set the text to look as a Title

  • title: 20px medium
<Typography title>Text</Typography>

Property: 'subheading'

This property will set the text to look as a Subheading

  • subheading: 15px (16px on device) regular
<Typography subheading>Text</Typography>

Property: 'body'

This is the type of text which is used in almost all projects

  • body2: 13px (14px on device) medium
  • body1: 13px (14px on device) regular
<Typography body2>Text</Typography>
<Typography body1>Text</Typography>

Property: 'caption'

This property will set the text to look as a Caption

  • subheading: 12px regular
<Typography caption>Text</Typography>

Property: 'button'

This property will set the text to look as a Button

  • subheading: 14px medium
<Typography button>Text</Typography>