Socket
Socket
Sign inDemoInstall

@material-ui/utils

Package Overview
Dependencies
15
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
Weekly downloads
1.4M
decreased by-5.38%
Maintainers
6
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.14

  • <!-- 14 -->[Joy] Add IconButton component (#30864) @siriwatknp
  • <!-- 13 -->[Joy] Use icon inside a Button (#30803) @siriwatknp

Docs

  • <!-- 16 -->[examples] Fix vitejs example and improve HMR (#30897) @mihailgaberov
  • <!-- 33 -->[docs] Improve autocomplete "limit tags" demo (#30910) @danilo-leal
  • <!-- 34 -->[docs] Sync translations with Crowdin (#30950) @l10nbot
  • <!-- 38 -->[docs] Improve description of the disableRestoreFocus prop of the TrapFocus (#30912) @flaviendelangle
  • <!-- 32 -->[docs] Remove ul with div children and replace with nav element (#30534) @joeframbach
  • <!-- 31 -->[docs] Add Saleor to showcase (#30924) @cherniavskii
  • <!-- 30 -->[docs] Include JSS in styling solution interoperability guide (#30736) @garronej
  • <!-- 29 -->[docs] Fix contents of link-underline-hover (#30904) @pppp606
  • <!-- 28 -->[docs] Fix markdown table format (#30947) @oliviertassinari
  • <!-- 27 -->[docs] Add missing import to RTL guide (#30891) @CFarhad
  • <!-- 26 -->[docs] Fix WithStyles import statement for @mui/styles (#30942) @altruity
  • <!-- 25 -->[docs] Fix broken roadmap table (#30943) @cherniavskii
  • <!-- 24 -->[docs] Fix broken URL in "Edit this page" button (#30923) @cherniavskii
  • <!-- 23 -->[docs] Migrate content to the new location (#30757) @siriwatknp
  • <!-- 22 -->[docs] Fix the link to the Vite.js example project (#30872) @GneyHabub
  • <!-- 21 -->[docs] Clarify the minimum configuration for TypeScript (#30790) @mnajdova
  • <!-- 20 -->[docs] Clarify what the name of @mui/material is (#30866) @oliviertassinari
  • <!-- 19 -->[docs] Remove migration from the releases page (#30863) @mnajdova
  • <!-- 18 -->[docs] Update Instructions for Google Maps Autocomplete (#30849) @kjschabra
  • <!-- 17 -->[docs] Hotfix notification (#30862) @siriwatknp
  • <!-- 04 -->[website] Sample GA to avoid hit limit (#30919) @oliviertassinari
  • <!-- 03 -->[website] Hide scrollbars of hero containers (#29474) @theiliad
  • <!-- 02 -->[website] Polishing spacing and other small things (#30828) @danilo-leal
  • <!-- 01 -->[website] Close the Developer Advocate role (#30867) @oliviertassinari

Core

  • <!-- 37 -->[core] Batch small fixes (#30952) @oliviertassinari
  • <!-- 34 -->[core] Rename the GitHub org (#30944) @oliviertassinari
  • <!-- 33 -->[core] Fix propTypes in components where OverridableStringUnion is used (#30682) @paales
  • <!-- 08 -->[test] Codify the difference between keyup and keydown in SelectUnstyled (#30857) @eps1lon
  • <!-- 07 -->[test] Fix typo (#30841) @caioagiani
  • <!-- 05 -->[utils] Use built-in hook when available for useId (#30654) @eps1lon

All contributors of this release in alphabetical order: @alisasanib, @altruity, @Ashish2097, @caioagiani, @CFarhad, @cherniavskii, @danilo-leal, @eps1lon, @flaviendelangle, @garronej, @GneyHabub, @joeframbach, @johsunds, @kjschabra, @m4theushw, @michaldudak, @mihailgaberov, @mnajdova, @mogrady88, @oliviertassinari, @paales, @pppp606, @siriwatknp, @theiliad

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

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