Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@material/typography

Package Overview
Dependencies
Maintainers
15
Versions
1667
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/typography

Typography classes, mixins, and variables for Material Components for the web

  • 14.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
877K
decreased by-5.18%
Maintainers
15
Weekly downloads
 
Created

What is @material/typography?

@material/typography is a package from the Material Design library that provides a set of typography styles and utilities to help developers implement consistent and visually appealing text styles in their web applications. It follows the Material Design guidelines for typography, ensuring that text elements are readable, accessible, and aesthetically pleasing.

What are @material/typography's main functionalities?

Applying Typography Styles

This feature allows you to apply predefined typography styles to HTML elements. By importing the CSS file and adding the appropriate class to an element, you can style text according to Material Design guidelines.

import '@material/typography/dist/mdc.typography.css';

const myElement = document.createElement('div');
myElement.className = 'mdc-typography--headline1';
myElement.textContent = 'Hello, World!';
document.body.appendChild(myElement);

Customizing Typography

This feature allows you to customize typography styles programmatically. By using the `typography` function, you can define custom styles and apply them to elements.

import { typography } from '@material/typography';

const customTypography = typography({
  fontFamily: 'Roboto, sans-serif',
  fontSize: '16px',
  fontWeight: '400',
  lineHeight: '1.5'
});

const myElement = document.createElement('div');
myElement.style.cssText = customTypography;
myElement.textContent = 'Custom Typography';
document.body.appendChild(myElement);

Other packages similar to @material/typography

Keywords

FAQs

Package last updated on 28 Apr 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc