npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-material-type-scale

v0.0.2

Published

Visual typography based on material design type scale.

Downloads

3

Readme

react-material-type-scale

Visual typography based on material design type scale.

Install

$ yarn add react-material-type-scale

or

$ npm i react-material-type-scale

Usage

All tags:

| Scale Category | Font | Size | Letter spacing | | -------------- | ------- | ---- | -------------- | | H1 | Light | 96 | -1.5 | | H2 | Light | 60 | -0.5 | | H3 | Regular | 48 | 0 | | H4 | Regular | 34 | 0.25 | | H5 | Regular | 24 | 0 | | H6 | Medium | 20 | 0.15 | | Subtile1 | Regular | 16 | 0.15 | | Subtile2 | Medium | 14 | 0.1 | | Body1 | Regular | 16 | 0.5 | | Body2 | Regular | 14 | 0.25 | | Button | Medium | 14 | 1.25 | | Caption | Regular | 12 | 0.4 | | Overline | Regular | 10 | 1.5 |

This example is available in CodeSandbox.

import React from 'react'
import { H1, Body1 } from 'react-material-type-scale'

function App() {
  return (
    <>
      <H1>Lorem ipsum dolor sit amet</H1>
      <Body1>
        Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
        Nulla consequat massa quis enim. Donec pede justo, fringilla vel,
        aliquet nec, vulputate eget, arcu. <br />
        In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum
        felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum
        semper nisi. Aenean vulputate eleifend tellus. <br />
        Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.
        Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.
        Phasellus viverra nulla ut metus varius laoreet. <br />
        Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur
        ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus,
        tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing
        sem neque sed ipsum.
        <br />
        Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas
        nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis
        faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt.
        Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna.
      </Body1>
    </>
  )
}

export default App

The react-material-type-scale can be used with React Native in the same way and with the same import. This example is available in Snack by Expo.

import React from 'react'
import { View, StyleSheet } from 'react-native'
import { Constants } from 'expo'
import { H1, Body1 } from 'react-material-type-scale/native'

function App() {
  return (
    <View styles={styles.container}>
      <H1>Lorem ipsum dolor sit amet</H1>
      <Body1>
      Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
      Nulla consequat massa quis enim. Donec pede justo, fringilla vel,
      aliquet nec, vulputate eget, arcu. '\n' In enim justo, rhoncus ut,
      imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis
      pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi.
      Aenean vulputate eleifend tellus.
      </Body1>
    </View>
  )
}

export default App

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: Constants.statusBarHeight,
    backgroundColor: '#ecf0f1',
    padding: 8,
  },
})