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

  • <!-- 07 -->[Joy] Add Card components (#32027) @siriwatknp

Docs

  • <!-- 30 -->[blog] New article for the date pickers migration to X (#31831) @flaviendelangle
  • <!-- 33 -->[docs] Base Menu style revisions and final review (#32097) @samuelsycamore
  • <!-- 32 -->[docs] Base Select style revisions and final review (#32095) @samuelsycamore
  • <!-- 31 -->[docs] Base Input style revisions and final review (#32096) @samuelsycamore
  • <!-- 30 -->[docs] Base Slider style revisions and final review (#32140) @samuelsycamore
  • <!-- 29 -->[docs] Base Modal style revisions and final review (#32093) @samuelsycamore
  • <!-- 28 -->[docs] Add page for CSS variables support in @mui/material (#32050) @mnajdova
  • <!-- 27 -->[docs] Add TSS support for theme style overrides (#31918) @garronej
  • <!-- 23 -->[docs] Simplify customization examples in ButtonUnstyled demos (#32092) @michaldudak
  • <!-- 22 -->[docs] Fix linking issues for the redirects (#32101) @siriwatknp
  • <!-- 21 -->[docs] Create the FormControl page (#32073) @michaldudak
  • <!-- 20 -->[docs] Remove trap-focus from the navigation (#32079) @psjishnu
  • <!-- 19 -->[docs] Add date-pickers product identifier (#32076) @siriwatknp
  • <!-- 18 -->[docs] Move SwitchUnstyled docs to the Base space (#31964) @michaldudak
  • <!-- 17 -->[docs] Add docs page for unstyled popper (#31813) @siriwatknp
  • <!-- 16 -->[docs] Copy TextareaAutosize docs to Base (#32034) @michaldudak
  • <!-- 15 -->[docs] Add react-hook-form-mui to Complementary projects #32015 @TkaczykAdam
  • <!-- 14 -->[docs] Improve the translation experience (#32021) @oliviertassinari
  • <!-- 13 -->[docs] Add small size Select demo (#32060) @ivan-ngchakming
  • <!-- 12 -->[docs] Correct typos (#32029) @apeltop
  • <!-- 11 -->[docs] Create SliderUnstyled docs (#31850) @michaldudak
  • <!-- 10 -->[docs] Create TablePaginationUnstyled docs (#32018) @michaldudak
  • <!-- 09 -->[docs] Move SelectUnstyled docs to the Base space (#31816) @michaldudak
  • <!-- 08 -->[docs] Create the TabsUnstyled docs (#32023) @michaldudak
  • <!-- 02 -->[website] The studio finally has a name, use it (#32105) @oliviertassinari
  • <!-- 01 -->[website] Disable job ad @oliviertassinari

Core

  • <!-- 28 -->[core] Update peer deps to support React 18 (#32063) @eps1lon
  • <!-- 27 -->[core] Fix running docs:api on Windows (#32091) @michaldudak
  • <!-- 26 -->[core] Fix api build script for Base UI (#32081) @siriwatknp

All contributors of this release in alphabetical order: @apeltop, @eps1lon, @flaviendelangle, @garronej, @ivan-ngchakming, @m4theushw, @MatthijsMud, @michaldudak, @mnajdova, @oliviertassinari, @psjishnu, @raigoinabox, @samuelsycamore, @siriwatknp, @TkaczykAdam

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 04 Jan 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