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.69 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.33

  • <!-- 09 -->[Joy] Add Checkbox documentation (#33171) @siriwatknp
  • <!-- 08 -->[Joy] Add List documentation (#33120) @siriwatknp
  • <!-- 07 -->[Joy] Make slider displays Joy classname (#33051) @siriwatknp

Docs

  • <!-- 28 -->[blog] Update Blogpost to clear confusion on "no impact" disclaimer. (#33131) @joserodolfofreitas
  • <!-- 27 -->[blog] Add post about v5 Migration guide update (#33063) @samuelsycamore
  • <!-- 26 -->[blog] Fix display on Safari (#33102) @oliviertassinari
  • <!-- 18 -->[docs] Add guide on how to use Base UI with Tailwind CSS (#33100) @mnajdova
  • <!-- 17 -->[docs] Improve Joy template UX (#33159) @siriwatknp
  • <!-- 16 -->[docs] Update Shadow DOM guide (#33160) @cherniavskii
  • <!-- 15 -->[docs] Fix SEO regressions (#33106) @oliviertassinari
  • <!-- 14 -->[docs] Add job ad in table of content (#33143) @mnajdova
  • <!-- 13 -->[docs] Add customization as a value proposition (#33014) @oliviertassinari
  • <!-- 12 -->[examples] Add example using nextjs & @mui/styles as a starter for the migration to v5 (#33005) @mnajdova
  • <!-- 01 -->[website] Replace Airtable with Ashby links for applying to a opened position (#33193) @DanailH

Core

  • <!-- 31 -->[core] Add CSS variables support for Material UI components (#32835) @siriwatknp
  • <!-- 23 -->[core] Add name to workspace root package.json (#33226) @Janpot
  • <!-- 22 -->[core] Update bug template with generic instruction (#33153) @joserodolfofreitas
  • <!-- 21 -->[core] Remove dead and redundant code (#33125) @oliviertassinari
  • <!-- 20 -->[core] Improve inline code rendering within the details tag (#33086) @Harmouch101

All contributors of this release in alphabetical order: @cherniavskii, @DanailH, @gin1314, @Harmouch101, @Janpot, @joserodolfofreitas, @kmurgic, @michaldudak, @mnajdova, @oliviertassinari, @ryancogswell, @samuelsycamore, @siriwatknp, @vicasas

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 09 May 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