Socket
Socket
Sign inDemoInstall

@material-ui/utils

Package Overview
Dependencies
15
Maintainers
6
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @material-ui/utils

Material-UI Utils - Utility functions for Material-UI.


Version published
Maintainers
6
Created

Package description

What is @material-ui/utils?

The @material-ui/utils package provides a collection of utility functions and helpers designed for use with Material-UI, a popular React UI framework. These utilities help with common tasks in application development such as event handling, component styling, and theme customization.

What are @material-ui/utils's main functionalities?

useControlled

This utility helps manage the state of controlled and uncontrolled components, making it easier to implement components that can operate in both modes.

import { useControlled } from '@material-ui/utils';
const [value, setValue] = useControlled({
  controlled: controlledProp,
  default: defaultValue,
});

useEventCallback

Ensures the stability of event handlers across re-renders, which can be particularly useful in components that rely on stable references to functions.

import { useEventCallback } from '@material-ui/utils';
const handleClick = useEventCallback((event) => {
  // handle the event
});

getScrollbarSize

This function calculates the size of the scrollbar on the page, which can be useful for adjusting layout or compensating for scrollbars in overflow scenarios.

import { getScrollbarSize } from '@material-ui/utils';
const scrollbarWidth = getScrollbarSize();

Other packages similar to @material-ui/utils

Changelog

Source

@mui/joy@5.0.0-alpha.8

  • <!-- 04 -->[Joy] Button API (#29962) @siriwatknp

Docs

  • <!-- 27 -->[docs] Fix color coercion (#30319) @Janpot
  • <!-- 25 -->[blog] Fix file import conflict resolution (#30391) @oliviertassinari
  • <!-- 21 -->[docs] Fix crash on Safari because of unsupported lookahead feature (#30345) @cherniavskii
  • <!-- 20 -->[docs] Update to new website domain (#30396) @ryota-murakami
  • <!-- 19 -->[docs] Fix text from material-ui to @mui to reflect v5 name changes (#30393) @pupudu
  • <!-- 18 -->[docs] Fix a11y in Menu demos (#30378) @ZeeshanTamboli
  • <!-- 17 -->[docs] Document how to unmount transition child (#30382) @oliviertassinari
  • <!-- 16 -->[docs] The current standard for quotes is QUOTATION MARK @oliviertassinari
  • <!-- 15 -->[docs] Fix 404 links (#30380) @oliviertassinari
  • <!-- 14 -->[docs] Fix Breadcrumb description (#30307) @jamesmelzer
  • <!-- 13 -->[docs] Modify injection order for Gatsby and SSR examples (#30358) @ShuPink
  • <!-- 12 -->[docs] Improve the translation experience (#30373) @oliviertassinari
  • <!-- 11 -->[docs] Sync translations with Crowdin (#30176) @l10nbot
  • <!-- 10 -->[docs] Fix link to /size-snapshot (#30363) @oliviertassinari
  • <!-- 09 -->[docs] Fix incorrect aria label in SpeedDial demo (#30354) @chwallen
  • <!-- 08 -->[docs] Fix incorrect number of breakpoint helpers (#30353) @chwallen
  • <!-- 07 -->[docs] Update outdated links (#30260) @oliviertassinari
  • <!-- 06 -->[docs] Support redirects from old urls to /material/* (#30286) @siriwatknp
  • <!-- 05 -->[examples] Fix CSS Modules integration (#30381) @oliviertassinari
  • <!-- 02 -->[website] Fix SEO issues (#30372) @oliviertassinari
  • <!-- 01 -->[website] Sync sponsors (#30259) @oliviertassinari

Core

  • <!-- 28 -->[core] Rename Material UI to MUI (#30338) @ZeeshanTamboli
  • <!-- 23 -->[core] Fix warning in dev mode (#30368) @oliviertassinari
  • <!-- 22 -->[core] Update buildApi script to support new structure (#30245) @siriwatknp

All contributors of this release in alphabetical order: @cherniavskii, @chwallen, @jamesmelzer, @Janpot, @kealjones-wk, @l10nbot, @mnajdova, @oliviertassinari, @pupudu, @ryota-murakami, @ShuPink, @siriwatknp, @wogsland, @ZeeshanTamboli

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 31 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc