The Ultimate Guide to Material-UI Table Pagination (MUI v5)

Material-UI Table Pagination Example

Table pagination can be broken into two conceptual pieces: the UI interface for changing pages, and the paginated data request. Material-UI’s TablePagination component is a robust component for solving the UI interface. The MUI TablePagination component is a dynamic and highly customizable component. It has 18 props listed in the docs, and these control everything … Read more

The Material-UI Dialog Component With Every Prop Enabled and Explained (MUI v5)

The Material-UI Dialog component is used for giving the user important information and blocking application interaction until the message is acknowledged. Interestingly, the component has far more props than the average MUI component: 19 props are listed in the docs. This is because the Dialog composition is complex (many layers of elements in the DOM), … Read more

The Definitive Guide to Material-UI Form Layout (MUI v5)

Form layout in Material-UI is simple if you are aware of all the components and props at your disposal. In this post we will discuss some of the form subcomponents that give you control over positioning. Additionally, we will examine when to use the Grid component for form layout There will be full code and … Read more

Every Material-UI Form Component Explained (MUI v5)

Forms are an important part of many web UIs.  Interestingly, Material-UI doesn’t have a form component.  It has seven form subcomponents (depending on what components you include), but simply relies on the native React Form component as a parent wrapper.  Alternatively, it could be argued the the FormControl component sometimes takes the place of the … Read more

The Ultimate Material-UI Custom Button Example (MUI v5)

The Material-UI (MUI) Button component merits a detailed exploration of all of its functionality. Its broad use across many UIs makes a deep knowledge of it’s props highly valuable. In this MUI Button demo I will create a new button variant (a great new feature in v5!), enable all props on it, and use it … Read more

The Ultimate Guide to the MUI ‘sx’ Prop

MUI sx Prop

Material-UI (rebranded as MUI) recently released version 5, and there were significant changes to the syntax and systems used for styling components. Material-UI v4 relied on JSS and the makeStyles hook for component styling. MUI v5 has migrated to two options: styled API or sx API (<- definitely read this). The styled API creates a … Read more

The Complete Guide to Material-UI Button Color (using MUI v5)

MUI Button color is a core aspect of proper theming. Fortunately MUI 5 (previously branded as Material-UI) makes it easy to apply the color you want. I will also include Material-UI v4 styling techniques for Buttons where there is a version difference. There are a variety of ways to apply the color you need for … Read more

The Ultimate Guide to the New MUI Stack Component

The Ultimate Guide to the New Material-UI Stack Component

Material-UI (now MUI) has a variety of excellent layout components. The Stack component is new in version 5 and was created to easily handle one-dimensional vertical and horizontal layouts. Previously these were often handled with the Box component using a flex layout, or a Grid component, but Grids were intended for 2-d layouts. One of … Read more

Material-UI Button onClick (and More Events) With TypeScript

MUI 5 is here, but many things are the same as Material-UI 4. Button props haven’t changed much and the look-n-feel of the Button component is as slick as ever. Whether you are using Material-UI 4 or 5, the Button code in this demo will be the same. There is a new alignment component called … Read more

How to Style the Material-UI Autocomplete Component

The Material-UI Autocomplete component and its Popper component can be styled by targeting built-in MUI styling APIs. In this demo I’ll show the selectors required for styling the Autocomplete component. I’ll do basic styling such as font size, border, hover color. An important characteristic of the Autocomplete component is that it has a Popper that … Read more