Socket
Socket
Sign inDemoInstall

@material-ui/utils

Package Overview
Dependencies
15
Maintainers
5
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
5
Install size
2.55 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.15

  • [Joy] Improve variant customization experience (#30878) @siriwatknp
  • [Joy] Make sx prop work in Joy (#30955) @siriwatknp

Framer

  • [design] Remove framer components (#30983) @mbrookes
  • [design] Remove framer leftovers (#31070) @michaldudak

Docs

  • [docs] Update installation guide of the icons package (#31026) @huyenltnguyen
  • [docs] Improve the indication for the legacy APIs (#30995) @mnajdova
  • [docs] Specify which props are added in the default shouldForwardProp option (#30978) @mnajdova
  • [docs] Fix layout shift on loading (#31017) @oliviertassinari
  • [docs] Increase scroll affordance in wide tables (#30713) @danilo-leal
  • [docs] Fix look & feel of the Masonry demos (#30971) @oliviertassinari
  • [docs] Improve Base component demos (#30884) @danilo-leal
  • [docs] Use full product names (Material UI, MUI System) (#30960) @oliviertassinari
  • [docs] Prefer useEnhancedEffect to avoid server side warnings (#30977) @mnajdova
  • [docs] Fix force redirection to a different locale (#30967) @oliviertassinari
  • [docs] Add live Tailwind CSS demo (#30966) @oliviertassinari
  • [website] Add banner for promoting priority open roles (#31076) @danilo-leal
  • [website] Open Full-stack Engineer role for studio (#31038) @prakhargupta1
  • [website] Minor security improvements (#31062) @oliviertassinari
  • [website] Improve title of open roles (#30963) @DanailH
  • [website] Add BIMI avatar (#30444) @oliviertassinari
  • [website] Add Sycamore to About page (#31000) @samuelsycamore

Core

  • [benchmark] Add missing dependency (#30994) @michaldudak
  • [core] Bump date-io version (#31016) @michaldudak
  • [core] Fix typo in useSlider (#31061) @ryohey
  • [core] Remove unused draft-js types package (#30993) @michaldudak
  • [test] Test if certain Base members are exported from Material UI (#31067) @michaldudak
  • [core] Remove dead code (#31064) @oliviertassinari

All contributors of this release in alphabetical order: @agauravdev, @alisasanib, @DanailH, @danilo-leal, @huyenltnguyen, @l10nbot, @liradb2000, @mbrookes, @michaldudak, @mnajdova, @prakhargupta1, @oliviertassinari, @ryohey, @samuelsycamore, @siriwatknp, @sydneyjodon-wk

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 03 Nov 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