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

@mui/icons-material

Package Overview
Dependencies
Maintainers
11
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mui/icons-material

Material Design icons distributed as SVG React components.

  • 6.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.3M
decreased by-5.27%
Maintainers
11
Weekly downloads
 
Created

What is @mui/icons-material?

The @mui/icons-material package provides a large set of icons created by the Material-UI team that are based on Google's Material Design. These icons can be easily integrated into React applications to enhance user interfaces with scalable and accessible pictographic assets.

What are @mui/icons-material's main functionalities?

Using Material Icons in React Components

This feature allows developers to import specific icons from the package and use them as React components within their application. The example shows how to import the AccessAlarm icon and render it in a component.

import React from 'react';
import AccessAlarmIcon from '@mui/icons-material/AccessAlarm';

function MyApp() {
  return (
    <div>
      <AccessAlarmIcon />
    </div>
  );
}

Customizing Icon Size and Color

Icons can be customized in terms of size and color by passing inline styles or using the 'sx' prop. The code sample demonstrates how to change the size to 40 pixels and the color to blue.

import React from 'react';
import AccessAlarmIcon from '@mui/icons-material/AccessAlarm';

function MyApp() {
  return (
    <div>
      <AccessAlarmIcon style={{ fontSize: 40, color: 'blue' }} />
    </div>
  );
}

Combining Icons with Material-UI Components

Material icons can be combined with other Material-UI components such as buttons. In this example, a Delete icon is used within an IconButton component to create a clickable delete button.

import React from 'react';
import IconButton from '@mui/material/IconButton';
import DeleteIcon from '@mui/icons-material/Delete';

function MyApp() {
  return (
    <IconButton aria-label='delete'>
      <DeleteIcon />
    </IconButton>
  );
}

Other packages similar to @mui/icons-material

Keywords

FAQs

Package last updated on 29 Aug 2024

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