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
Weekly downloads
1.2M
decreased by-16.86%
Maintainers
5
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.17

  • <!-- 13 -->[Joy] Add nested list components (#31159) @siriwatknp
  • <!-- 12 -->[Joy] Improve color customization on Switch (#31137) @siriwatknp
  • <!-- 11 -->[Joy] Add Sheet component (#31124) @hbjORbj
  • <!-- 10 -->[Joy] add Input component (#31086) @siriwatknp
  • <!-- 09 -->[Joy] Fix Button missing slot type (#31166) @siriwatknp

Docs

  • <!-- 22 -->[docs] Fix 404 link to the blog (#31234) @oliviertassinari
  • <!-- 21 -->[docs] Use material-ui for product name (#31200) @siriwatknp
  • <!-- 20 -->[docs] Add Base installation page (#30969) @siriwatknp
  • <!-- 19 -->[docs] Use new Algolia app for new structure (#31178) @siriwatknp
  • <!-- 18 -->[docs] Typo in the FormControl API documentation (#31169) @bonellia
  • <!-- 17 -->[docs] Fix typo in Stack documentation (#31176) @adriancampos
  • <!-- 16 -->[docs] Update interoperability.md broken tailwind links (#31182) @robertwt7
  • <!-- 15 -->[docs] Add missing import into tss-react migration guide (#31162) @sviande
  • <!-- 03 -->[website] The role is filled (#31216) @oliviertassinari
  • <!-- 02 -->[website] Revise the row grouping blog post (#31101) @samuelsycamore
  • <!-- 01 -->[website] Fix a few SEO issues (#31150) @oliviertassinari

Core

  • <!-- 30 -->[core] Add group for the @fortawesome dependencies (#31193) @mnajdova
  • <!-- 25 -->[core] Update playwright docker to match the specified version (#31236) @siriwatknp
  • <!-- 24 -->[core] Remove parallel on buildTypes (#31189) @siriwatknp
  • <!-- 23 -->[core] Fix propTypes generation for optional any props (#31141) @m4theushw
  • <!-- 04 -->[typescript] Remove variants deprecation (#31239) @siriwatknp

All contributors of this release in alphabetical order: @adriancampos, @Andarist, @bonellia, @davwheat, @greengiraffe, @hbjORbj, @iclaude3, @m4theushw, @michaldudak, @mnajdova, @oliviertassinari, @PunitSoniME, @RedHeadphone, @robertwt7, @samuelsycamore, @siriwatknp, @sviande

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

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