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.73 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.36

  • [Joy] Add guide about using Joy and Material UI together (#33396) @siriwatknp
  • [Joy] Fix variants color palette regressions (#33394) @danilo-leal

Docs

  • [docs] Correcting small grammatical error (#33393) @robyyo
  • [docs] Link to the correct package on Joy component pages (#33439) @cherniavskii
  • [docs] Fix e2e tests (#33477) @siriwatknp
  • [docs] Fix dead links (#33462) @oliviertassinari
  • [docs] Cleanup the migration (#33463) @siriwatknp
  • [docs] Fix broken Sponsoring services links @samuelsycamore
  • [docs] Improve repo README with light/dark logos, relative links and more (#33356) @samuelsycamore
  • [docs] Update links to MUI X Overview and Introduction pages (#33201) @samuelsycamore
  • [docs] Update to React 18 (#33196) @mnajdova
  • [docs] Simplify "Upload button" demo (#33326) @baharalidurrani
  • [docs] Add "refine" demo to showcase (#33240) @omeraplak
  • [docs] Add Webpack alias for legacy utils package (#33376) @jgbae
  • [docs] Improve external link icons synonyms (#33257) @davidgarciab
  • [examples] Update Base UI with Tailwind CSS to use the latest versions of the dependencies (#33401) @mnajdova
  • [examples] Add Base UI example (#33154) @siriwatknp

Core

  • [core] Fix @mui/monorepo regression for the import of the docs infra (#33390) @Janpot
  • [core] Remove old babel resolve rule (#33432) @oliviertassinari
  • [website] Shorten the plan descriptions on the pricing page (#32984) @joserodolfofreitas
  • [website] Link EULA in the license quantity section (#33292) @oliviertassinari

All contributors of this release in alphabetical order: @baharalidurrani, @cherniavskii, @danilo-leal, @davidgarciab, @flaviendelangle, @hbjORbj, @ivan-ngchakming, @Janpot, @jgbae, @joebingham-wk, @joserodolfofreitas, @michaldudak, @mnajdova, @oliviertassinari, @omeraplak, @robyyo, @samuelsycamore, @siriwatknp, @ZeeshanTamboli

Readme

Source

@material-ui/utils

Shared utilities used by Material-UI packages.

Keywords

FAQs

Last updated on 24 Jun 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