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

Utility functions for React components.


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

  • [Joy] Improve theme focus to be more flexible (#32405) @siriwatknp
  • [Joy] Add Radio, RadioGroup components (#32279) @siriwatknp
  • [Joy] Add Chip component (#31983) @hbjORbj
  • [Joy] Improve controls (#32267) @siriwatknp
  • [Joy] Set up docs (#32370) @siriwatknp

Docs

  • [docs] Enable row reordering on the pricing page (#31875) @DanailH
  • [blog] A few improvements on date picker change (#32325) @oliviertassinari
  • [docs] Emphasize how to avoid failing tests when migrating from v4 to v5 (#32159) @dwjohnston
  • [docs] Revise the related projects page (#32180) @danilo-leal
  • [docs] Cleanup remaining @mui/styles usages (#32313) @mnajdova
  • [docs] Fix sidenav mobile color (#32324) @oliviertassinari
  • [docs] Base TrapFocus style revisions and final review (#32364) @samuelsycamore
  • [docs] Update the README.md to better cover the different products (#32360) @samuelsycamore
  • [docs] Improve the propTypes generation and API demos' links (#32295) @mnajdova
  • [docs] Add ability to display a plan icon next to a page link in nav bar (#32393) @flaviendelangle
  • [docs] Change label on FormControlLabelPlacement (#32322) @ainatenhi
  • [website] Update Diamond sponsors list (#32433) @oliviertassinari
  • [website] Add privacy policy link to website's footer (#32080) @danilo-leal
  • [website] Remove the designer role (#32384) @danilo-leal

Core

  • [core] yarn prettier write @oliviertassinari
  • [core] Fix changelog warning message (#32240) @praveen001
  • [core] Update the proptypes scripts to support components in @mui/system (#32456) @mnajdova

All contributors of this release in alphabetical order: @abhinav-22-tech, @ainatenhi, @DanailH, @danilo-leal, @dwjohnston, @flaviendelangle, @hbjORbj, @mnajdova, @oliviertassinari, @praveen001, @samuelsycamore, @siriwatknp, @valerii15298, @ZeeshanTamboli

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 11 Feb 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