Socket
Socket
Sign inDemoInstall

@material-ui/utils

Package Overview
Dependencies
13
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
Install size
2.59 MB
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.21

  • <!-- 09 -->[Joy] Add AvatarGroup component (#31980) @siriwatknp
  • <!-- 07 -->[Joy] Miscellaneous fixes (#31873) @siriwatknp
  • <!-- 08 -->[Joy] Miscellaneous fixes 2 (#31971) @siriwatknp

Docs

  • <!-- 27 -->[docs] Improve the a11y on the hover rating demo (#31970) @mnajdova
  • <!-- 26 -->[docs] Improve a11y on the SplitButton demo (#31969) @mnajdova
  • <!-- 25 -->[docs] Improve the color description in the API pages (#30976) @mnajdova
  • <!-- 24 -->[docs] Add docs page for unstyled Modal (#31417) @mnajdova
  • <!-- 23 -->[docs] Add InputUnstyled docs (#31881) @mnajdova
  • <!-- 22 -->[docs] Remove "Work in biotech" from the showcase (#31942) @oliviertassinari
  • <!-- 21 -->[docs] Fix in-house ad for the design kits (#31965) @oliviertassinari
  • <!-- 20 -->[docs] Fix the documentation for filterOptions in Autocomplete API page (#31416) @santhoshbala0178
  • <!-- 19 -->[docs] Update href for 'TypeScript guide on theme customization' (#31880) @NickFoden
  • <!-- 18 -->[docs] Fix the CSS Modules example in the Interoperability page (#31935) @WilsonNet
  • <!-- 17 -->[docs] Fix small typo in the styled() utility page (#31967) @jason1985
  • <!-- 16 -->[docs] Update mui-x on material-ui navigation (#31810) @siriwatknp
  • <!-- 15 -->[docs] Copy ClickAwayListener docs to Base (#31878) @michaldudak
  • <!-- 14 -->[docs] Refine the redirects (#31939) @siriwatknp
  • <!-- 13 -->[docs] Fix TOC layout for large screen (#31953) @siriwatknp
  • <!-- 12 -->[examples] Update remix example to not use NODE_ENV guard for LiveReload (#31269) @eswarclynn
  • <!-- 06 -->[NoSsr] Copy docs to the Base space (#31956) @michaldudak
  • <!-- 05 -->[Portal] Copy Portal docs to the Base space (#31959) @michaldudak
  • <!-- 01 -->[website] Remove X-Frame-Options @oliviertassinari
  • <!-- 35 -->Revert "[website] Remove X-Frame-Options" @oliviertassinari

Core

  • <!-- 30 -->[core] Fixes error in changelog generator for item sorting/padding (#30088) @dimitropoulos
  • <!-- 29 -->[core] Fix typo in issue template @oliviertassinari
  • <!-- 28 -->[core] Replace deprecated String.prototype.substr() (#31806) @CommanderRoot
  • <!-- 04 -->[test] Add tests for component using StandardProps and polymorphic components (#31945) @mnajdova

All contributors of this release in alphabetical order: @bicstone, @CommanderRoot, @dimitropoulos, @eps1lon, @eswarclynn, @igordanchenko, @jannes-io, @jason1985, @m4theushw, @michaldudak, @mnajdova, @NickFoden, @oliviertassinari, @ryancogswell, @santhoshbala0178, @siriwatknp, @WilsonNet

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 30 Dec 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