Socket
Socket
Sign inDemoInstall

@material-ui/utils

Package Overview
Dependencies
13
Maintainers
7
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @material-ui/utils

Utility functions for React components.


Version published
Weekly downloads
1.4M
increased by5.03%
Maintainers
7
Created
Weekly downloads
 

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.29

  • <!-- 19 -->[Joy] Show Joy pages on master (#32866) @siriwatknp
  • <!-- 18 -->[Joy] Add an overview page (#32836) @danilo-leal
  • <!-- 17 -->[Joy] Add doc for the card components (#32825) @siriwatknp
  • <!-- 16 -->[Joy] Miscellaneous fixes (#32815) @siriwatknp

Docs

  • <!-- 31 -->[docs] Simplify header DOM structure (#32844) @oliviertassinari
  • <!-- 30 -->[docs] Fix CodeSandbox & StackBlitz generation (#32726) @siriwatknp
  • <!-- 29 -->[docs] Fix urls to columns pages in pricing table (#32842) @alexfauquette
  • <!-- 28 -->[docs] Fix Tailwind CSS integration docs (#32512) @robertwt7
  • <!-- 27 -->[docs] Fixed wrong command for the link-underline-hover codemod (#32793) @veronikaslc
  • <!-- 26 -->[docs] Fixed broken link on the icons page (#32780) @SamuelMaddox
  • <!-- 25 -->[docs] Add "back to top" button (#30441) @VibhorJaiswal
  • <!-- 24 -->[docs] Fix typo in notifications @mbrookes
  • <!-- 32 -->[docs] New WAI-ARIA guidelines location (#32865) @oliviertassinari
  • <!-- 23 -->[docs] Mention the ESLint plugin for detecting unused classes in tss-react (#32666) @garronej
  • <!-- 22 -->[docs] Update useAutocomplete demos to use Mui-focused class (#32757) @ZeeshanTamboli
  • <!-- 21 -->[examples] Fix NextLinkComposedProps gives a TypeScript error (#32655) @ZeeshanTamboli
  • <!-- 01 -->[website] Add Pedro to About Us page (#32803) @apedroferreira

Core

  • <!-- 32 -->[core] Upgrade MUI X dependency (#32824) @oliviertassinari
  • <!-- 02 -->[typescript] Allow module augmentation for Mixins (#32798) @mnajdova

All contributors of this release in alphabetical order: @abriginets, @alexfauquette, @alisasanib, @apedroferreira, @danilo-leal, @diggis00, @flaviendelangle, @garronej, @JeanPetrov, @mbrookes, @mnajdova, @nate-summercook, @o-dubrovskyi, @oliviertassinari, @paales, @robertwt7, @SamuelMaddox, @siriwatknp, @veronikaslc, @VibhorJaiswal, @ZeeshanTamboli

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 04 Apr 2021

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