Socket
Socket
Sign inDemoInstall

@mui/icons-material

Package Overview
Dependencies
Maintainers
11
Versions
113
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.


Version published
Weekly downloads
2.6M
decreased by-14.32%
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 09 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