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
Maintainers
7
Install size
2.66 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.30

  • <!-- 13 -->[Joy] use textColor prop for Typography and Link (#32938) @siriwatknp
  • <!-- 12 -->[Joy] Make variants for more flexible (#32931) @siriwatknp
  • <!-- 11 -->[Joy] Improve automatic adjustment (#32923) @siriwatknp
  • <!-- 10 -->[Joy] Add Chip doc (#32819) @hbjORbj
  • <!-- 09 -->[Joy] Add AspectRatio demos (#32848) @siriwatknp
  • <!-- 08 -->[Joy] Fix wrong urls (#32883) @siriwatknp

Docs

  • <!-- 24 -->[docs] Iterate on the job ad for React engineer in Core (#32900) @mnajdova
  • <!-- 23 -->[blog] Fix avatar image resolution (#32890) @oliviertassinari
  • <!-- 19 -->[docs] Link the first page of the product (#32943) @oliviertassinari
  • <!-- 18 -->[docs] Batch small changes (#32170) @michaldudak
  • <!-- 17 -->[docs] Allow function prop to return undefined (#32766) @m4theushw
  • <!-- 16 -->[docs] Fix wrong link to Material Icons (#32847) @oliviertassinari
  • <!-- 15 -->[docs] Fix ClassNameGenerator content (#32800) @siriwatknp
  • <!-- 14 -->[docs] Fix navigation links (#32851) @oliviertassinari
  • <!-- 14 -->[docs] Document the size prop for InputLabel (#32936) @romelperez
  • <!-- 21 -->[docs] Add note about transparent background on the outlined Alert variant (#32810) @aaarichter
  • <!-- 01 -->[website] Update the careers's page with the new roles (#32535) @oliviertassinari

Core

  • <!-- 22 -->[core] Improve the incomplete issues workflow (#32878) @mnajdova
  • <!-- 21 -->[core] Add CI check that the PR has label (#32886) @mnajdova
  • <!-- 20 -->[core] Avoid leaking @babel/runtime (#32874) @oliviertassinari

All contributors of this release in alphabetical order: @aaarichter, @hbjORbj, @m4theushw, @michaldudak, @mnajdova, @oliviertassinari, @romelperez, @siriwatknp

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 20 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