<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ThemeWagon on Medium]]></title>
        <description><![CDATA[Stories by ThemeWagon on Medium]]></description>
        <link>https://medium.com/@themewagonblog?source=rss-14635811f586------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*P_NbyCFjBebDK21eZ-p13g.png</url>
            <title>Stories by ThemeWagon on Medium</title>
            <link>https://medium.com/@themewagonblog?source=rss-14635811f586------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:20:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@themewagonblog/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[MUI Icons: How to Install & Customize for Consistent Design]]></title>
            <link>https://themewagonblog.medium.com/mui-icons-how-to-install-customize-for-consistent-design-b77401d96049?source=rss-14635811f586------2</link>
            <guid isPermaLink="false">https://medium.com/p/b77401d96049</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[material-ui]]></category>
            <dc:creator><![CDATA[ThemeWagon]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 12:37:47 GMT</pubDate>
            <atom:updated>2025-01-20T12:37:47.668Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*pBkcEtiRR_IC3qzjtRhs2g.png" /></figure><p>Material UI has a massive UI component library, inspired by <a href="https://themewagon.com/blog/material-design-vs-material-ui-designers-pov/">Google’s Material Design</a> system, to empower React developers. These multi-type components have <a href="https://themewagon.com/theme-framework/material-ui/">built-in designs</a>, which assist developers in creating extraordinary designs. MUI icon is one of them. These icons help the design represent the tone of the author’s or company’s in a more effective way.</p><p>This blog post will discuss how to make the most of the MUI icons in your project, discussing step-by-step integration styling.</p><h3>Getting Started with MUI Icons</h3><p>Material UI library contains 2100+ material icons converted into SvgIcon components available under the <strong>“@mui/icons-material” </strong>package. These icons use the Material UI SvgIcon component to render the SVG path for each icon. Let’s begin installing the MUI icons.</p><h3>Material UI Library Installation</h3><p>Installing Material UI library with a React-based project is generally easier. To utilize Material UI icons in your project, you need to install the Material UI library as the <strong>“@mui/icons-material”</strong> depends on the <strong>“@mui/material”</strong> package. However, before installing the Material UI library, you must install the following dependencies:</p><pre>&quot;peerDependencies&quot;: {<br>  &quot;react&quot;: &quot;^17.0.0 || ^18.0.0&quot;,<br>  &quot;react-dom&quot;: &quot;^17.0.0 || ^18.0.0&quot;<br>},</pre><p>When you have these peerDependencies installed, it’s time to download and install the MUI icon packages. It is very useful, especially when importing several icons simultaneously. For installation of this package in your directory, use the code below:</p><pre>// with npm<br>npm install @mui/icons-material</pre><pre>// with yarn<br>yarn add @mui/icons-material</pre><h4>Installing MUI SVG Icon API</h4><p>If you want to use MUI SVG icons, you can use the SvgIcon wrapper. This package provides the Google Material Icons converted to <a href="https://mui.com/material-ui/api/svg-icon/">SvgIcon</a> components. It comes with built-in accessibility.</p><p>For installation use:</p><pre>import SvgIcon from &#39;@mui/material/SvgIcon&#39;;<br>// or<br>import { SvgIcon } from &#39;@mui/material&#39;;</pre><p>Besides, MUI allows you to use custom SVG icons using the MUI SvgIcon wrapper. It will be covered in the following sections.</p><h3>Importing Material UI Icons</h3><p>After installing the <strong>“@mui/icons-material”</strong> package, you have full access to the entire Material UI icon set. To import the icons in your project, add an import statement at the top of your project file, following these 2 options:</p><p>Option 1</p><pre>import AccessAlarmIcon from &#39;@mui/icons-material/AccessAlarm&#39;;</pre><pre>import ThreeDRotation from &#39;@mui/icons-material/ThreeDRotation&#39;;</pre><p>Option 2</p><pre>import { AccessAlarm, ThreeDRotation } from &#39;@mui/icons-material&#39;;</pre><p>If you want to import the icons by reducing bundle size, option 1 is the safest way. But some developers also choose option 2. After that, simply use the icon as a component in your JSX code, like this: &lt;AccessAlarmIcon /&gt;.</p><p>For example:</p><h4>Installing MUI SVG Icon API</h4><p>If you want to use MUI SVG icons, you can use the SvgIcon wrapper. This package provides the Google Material Icons converted to <a href="https://mui.com/material-ui/api/svg-icon/">SvgIcon</a> components. It comes with built-in accessibility.</p><p>For installation use:</p><pre>import SvgIcon from &#39;@mui/material/SvgIcon&#39;;<br>// or<br>import { SvgIcon } from &#39;@mui/material&#39;;</pre><p>Besides, MUI allows you to use custom SVG icons using the MUI SvgIcon wrapper. It will be covered in the following sections.</p><h3>Importing Material UI Icons</h3><p>After installing the <strong>“@mui/icons-material”</strong> package, you have full access to the entire Material UI icon set. To import the icons in your project, add an import statement at the top of your project file, following these 2 options:</p><p>Option 1</p><pre>import AccessAlarmIcon from &#39;@mui/icons-material/AccessAlarm&#39;;</pre><pre>import ThreeDRotation from &#39;@mui/icons-material/ThreeDRotation&#39;;</pre><p>Option 2</p><pre>import { AccessAlarm, ThreeDRotation } from &#39;@mui/icons-material&#39;;</pre><p>If you want to import the icons by reducing bundle size, option 1 is the safest way. But some developers also choose option 2. After that, simply use the icon as a component in your JSX code, like this: &lt;AccessAlarmIcon /&gt;.</p><p>For example:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-gvqth5%3Fembed%3D1%26file%3DDemo.tsx&amp;display_name=StackBlitz&amp;url=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-gvqth5%3Ffile%3DDemo.tsx&amp;image=https%3A%2F%2Fsocial-img.staticblitz.com%2Fprojects%2Freact-gvqth5%2F07cf210ba20540839a03bcf2a001a207&amp;type=text%2Fhtml&amp;schema=stackblitz" width="745" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/dbb1d2e7b63af709ec68cda163698ae7/href">https://medium.com/media/dbb1d2e7b63af709ec68cda163698ae7/href</a></iframe><p>Each Material UI icon includes 5 built-in themes. They are: filled (default), Outlined, Rounded, Two-tone, and Sharp. While importing these components, you can add these theme names to the icon name and get a default shape for the icons. For example, @mui/icons-material/MenuRounded gives a hamburger icon with a rounded theme.</p><p>See the following examples:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-a1tmit%3Fembed%3D1%26file%3DDemo.tsx&amp;display_name=StackBlitz&amp;url=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-a1tmit%3Ffile%3DDemo.tsx&amp;image=https%3A%2F%2Fsocial-img.staticblitz.com%2Fprojects%2Freact-a1tmit%2F08d424a13fa2628ac62d0e98b2690a52&amp;type=text%2Fhtml&amp;schema=stackblitz" width="745" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd89752e95e49a3661ca1108c502939c/href">https://medium.com/media/cd89752e95e49a3661ca1108c502939c/href</a></iframe><h3>Customizing Material UI Icons</h3><p>Like the <a href="https://themewagon.com/blog/the-ultimate-guide-to-choosing-between-material-ui-bootstrap-tailwind-css/">most popular frameworks</a>, Material UI icons have a built-in design and don’t require much modification. Yet, it’s better to change the color and size slightly to help it fit well with your design. Now, we will look at customizing the color and size of the MUI icons.</p><h3>How to Change Material UI Icon Color</h3><p>MUI icons by default inherit the original text color. However, you can customize icon color using the theme color properties (primary, secondary, action, error, and disabled) or using color codes.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-xltpbs%3Fembed%3D1%26file%3DDemo.tsx&amp;display_name=StackBlitz&amp;url=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-xltpbs%3Ffile%3DDemo.tsx&amp;image=https%3A%2F%2Fsocial-img.staticblitz.com%2Fprojects%2Freact-xltpbs%2Fdb263628bd97bb98b309655791bd9148&amp;type=text%2Fhtml&amp;schema=stackblitz" width="745" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/57f1cf29ae7e2ec283f6382b3338433a/href">https://medium.com/media/57f1cf29ae7e2ec283f6382b3338433a/href</a></iframe><p>From this code example, we get 3 home icons with different sizes. Since there was no customized color set, it took the original text color, and the 1st one has the default size. The other 2 icons are large, and customized fixed value size: 50 accordingly.</p><p>Additionally, you can also adjust the size using the fontSize property of the IconButton component. It allows specifying the size of the icon within the button itself.</p><h3>How to use SVG Icons in Material UI</h3><p>Material UI lets you create customized icons according to your branding style. The MUI icon set has createSVGIcon a utility component that allows you to create custom MUI SVG icons for your project. Take a look at the following example:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-88hvdm%3Fembed%3D1%26file%3DDemo.tsx&amp;display_name=StackBlitz&amp;url=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-88hvdm%3Ffile%3DDemo.tsx&amp;image=https%3A%2F%2Fsocial-img.staticblitz.com%2Fprojects%2Freact-88hvdm%2F3b8e5fb08796dbda07d2f9d659d35e12&amp;type=text%2Fhtml&amp;schema=stackblitz" width="745" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/08b3e59537ee5b199b84d43ef79c73d8/href">https://medium.com/media/08b3e59537ee5b199b84d43ef79c73d8/href</a></iframe><p>Here, the createSvgIcon utility component wraps the &lt;svg&gt; element and the SVG path. The MUI SvgIcon component then inherits it as a child.</p><h3>Using Material UI Icon Component</h3><p>React allows the Icon component to add icons within Material UI. It displays any icon font that supports ligatures. The Icon also inherits the current text color, but you can also set it differently, like other MUI icons. To use the Icon component, simply wrap the icon name (font ligature) with it.</p><p>import Icon from &#39;@mui/material/Icon&#39;;<br>&lt;Icon&gt;star&lt;/Icon&gt;;</p><p><strong>NB: When using the Icon font, it is important to include the Material Icons font as a prerequisite in your project.</strong></p><p>This is an example of a font Icon.</p><p>Here, the createSvgIcon utility component wraps the &lt;svg&gt; element and the SVG path. The MUI SvgIcon component then inherits it as a child.</p><h3>Using Material UI Icon Component</h3><p>React allows the Icon component to add icons within Material UI. It displays any icon font that supports ligatures. The Icon also inherits the current text color, but you can also set it differently, like other MUI icons. To use the Icon component, simply wrap the icon name (font ligature) with it.</p><p>import Icon from &#39;@mui/material/Icon&#39;;<br>&lt;Icon&gt;star&lt;/Icon&gt;;</p><p><strong>NB: When using the Icon font, it is important to include the Material Icons font as a prerequisite in your project.</strong></p><p>This is an example of a font Icon.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-nexdbm%3Fembed%3D1%26file%3DDemo.tsx&amp;display_name=StackBlitz&amp;url=https%3A%2F%2Fstackblitz.com%2Fedit%2Freact-nexdbm%3Ffile%3DDemo.tsx&amp;image=https%3A%2F%2Fsocial-img.staticblitz.com%2Fprojects%2Freact-nexdbm%2Fcb646964bed4eb5bdf91fe316e618e43&amp;type=text%2Fhtml&amp;schema=stackblitz" width="745" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/42f2e1c16c414af2160ee7f94e106081/href">https://medium.com/media/42f2e1c16c414af2160ee7f94e106081/href</a></iframe><h3>How to Use Font Material Icons</h3><p>The Icon component sets the correct base class name for Material Icons with the ‘filled’ variant. You just need to load the font you want to use, for example, Google Web Fonts. You can load the font using this:</p><p>&lt;link <br>rel=&quot;stylesheet <br>href=&quot;https://fonts.googleapis.com/icon?family=Material+Icons <br>/&gt;</p><p>To use other fonts, you can use custom fonts. For this, customize the baseline class using the baseClassName prop.</p><p>For example, if you want to use two-tone icons using the Icon component, load the font like this:</p><p>import Icon from &#39;@mui/material/Icon&#39;;</p><p>&lt;link <br>rel=&quot;stylesheet <br>href=&quot;https://fonts.googleapis.com/css?family=Material+Icons+Two+Tone<br>/&gt;</p><p>It will import the two-tone Material Design variant.</p><p>You can also declare the baseClassName prop globally. It will let you use fonts directly and prevent you from constantly changing the prop, which will help you perform better.</p><pre>const theme = createTheme({<br>  components: {<br>    MuiIcon: {<br>      defaultProps: {<br>        // Replace the `material-icons` default value.<br>        baseClassName: &#39;material-icons-two-tone&#39;,<br>      },<br>    },<br>  },<br>});</pre><pre>&lt;Icon&gt;add_circle&lt;/Icon&gt;</pre><p>This code snippet displays two-tone icons with Material Design and lets you design the font directly.</p><h3>How to get the best out of a MUI Icon Set</h3><p>Customizing MUI icons is necessary to match your branding or design approach. But there arises some misuse of the MUI icon set too. So we should follow some tips to get the best out of it:</p><ul><li><strong>Understanding Requirements</strong>: Gather your design requirements and goals. It will help you proceed with the suitable icons you need.</li><li><strong>Importing Icons Individually</strong>: Importing icons individually helps optimize bundle size. So import only the icons you need. Example:<br> import HomeIcon from &#39;@mui/icons-material/Home&#39;;<br> import SearchIcon from &#39;@mui/icons-material/Search&#39;</li><li><strong>Using Correct Version</strong>: MUI icons also have different versions to work seamlessly with the corresponding MUI version. So, you must ensure your MUI icon set’s version matches your core version.</li><li><strong>Accessibility</strong>: When necessary, use the {aria-label} or {title} attributes to make icons easier to read and use with screen readers.</li><li><strong>Follow Design Consistency</strong>: Maintain consistency in using the icons throughout the application to ensure a cohesive design.</li></ul><p>In conclusion, we’ve gone from understanding the fundamentals of Material UI icons to delving deep into the world of SVG icons to how these small design elements can change things. Although the world of icons may appear big and challenging to understand, it’s a fun place with lots of options if you know what you’re doing and have the right tools. Material UI provides versatile customization with its components and tools, so it becomes fun with MUI icons as well.</p><p>If you’re trying to explore Material UI for your next project, a better approach could be to <a href="https://themewagon.com/blog/free-material-ui-dashboard-templates-by-themewagon/">find pre-built templates</a> for a simpler access into the framework. Moreover, for a better insight into the framework and to find answers to the frequently asked questions about Material UI, explore our article on <a href="https://themewagon.com/blog/material-ui-faq/">Material UI FAQs</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b77401d96049" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Material UI Grid System: MUI Grid v2 for Responsive Design]]></title>
            <link>https://themewagonblog.medium.com/material-ui-grid-system-mui-grid-v2-for-responsive-design-f30359068ad7?source=rss-14635811f586------2</link>
            <guid isPermaLink="false">https://medium.com/p/f30359068ad7</guid>
            <category><![CDATA[grid-system]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[material-ui]]></category>
            <category><![CDATA[grid]]></category>
            <category><![CDATA[responsive-design]]></category>
            <dc:creator><![CDATA[ThemeWagon]]></dc:creator>
            <pubDate>Wed, 27 Nov 2024 06:29:15 GMT</pubDate>
            <atom:updated>2024-11-28T05:44:21.391Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9-y9VNvLLLTCWu_KIa-6Bw.png" /></figure><p>In web design, a grid system is the ideal way to establish any web application’s aesthetic value and user experience. To meet the accelerating demand for mobile-first web designs among businesses and stakeholders, popular web design frameworks, including Material UI (MUI) are working to develop responsive design systems.</p><p>This article will emphasize the latest version of MUI grid- <strong>Material UI Grid v2</strong>. The new MUI Grid is more developer-friendly and offers smoother customization options. Additionally, we will cover everything from ways to migrate from the older versions to the latest, to the basic customization concepts of the MUI grid system, exemplifying with a simple responsive card design with it.</p><p>In this blog, we will uncover the Material UI Grid System to help you create visually consistent layouts without blemishing the flexibility of the web pages. It will further help you enhance and optimize the performance of your websites.</p><h3>What is Material UI Grid System?</h3><p>The large component library of Material UI avails a distinct Grid component to facilitate your MUI project. You can establish an MUI Grid System, incorporating the Grid component in your project.</p><p>Additionally, MUI Grid v2 uses the CSS Flexbox for better flexibility. So, a basic understanding of the way <a href="https://themewagon.com/blog/css-grid-and-flexbox-a-brief-juxtaposition/">CSS Flexbox works </a>may provide additional insight into the MUI grid system.</p><p>Previously, the MUI Grid system had two properties: containers and items. The grid container was the parent or wrapper that organized child components (grid items) in a flex box-like layout. It used to contain one or more grid items with spacing, alignment, styling, or other properties. Grid items referred to the child elements that availed a certain amount of grid layout and specified a particular element’s behavior on the viewport.</p><p>To make coding more efficient, the updated version MUI Grid v2 has introduced a grid that functions simultaneously as an item and a container. We will discuss it elaborately in the following sections.</p><blockquote>:: Remember that, the MUI Data Grid and the Material UI Grid component are two completely different things. <strong>MUI Data Grid</strong> <em>displays tabular data from a dataset</em>, while <strong>MUI Grid component</strong> is actually<em> a layout grid</em> for creating responsive layouts.</blockquote><h3>Starting with the Installation of MUI Grid v2</h3><p>Before using the MUI Grid v2, you need to add the <strong>“@mui/material”</strong> package to your project.</p><pre>npm install @mui/material @emotion/react @emotion/styled<br>// or,<br>yarn add @mui/material @emotion/react @emotion/styled</pre><p>After adding the package, import the grid component using the following:</p><pre>import Grid2 from &#39;@mui/material/Grid2&#39;;<br>// or<br>import { Grid2 } from &#39;@mui/material&#39;;</pre><h3>Material UI Grid v2 Container prop for Responsive Design</h3><p>As mentioned above, Grid is now an item in MUI Grid v2. The grid will act both as a container and an item, like a flex item, always in the latest MUI Grid. Grid items refer to the child elements that take a certain amount of grid layout and specify a particular element’s behavior on the viewport. Instead of the item prop, you can use the container prop and implement the necessary customization.</p><p>Follow the example below:</p><pre>import React from &#39;react&#39;;<br>import { Grid2 } from &#39;@mui/material&#39;;</pre><pre>function MyComponent() {<br>  return (<br>    &lt;Grid container&gt;<br>      &lt;Grid {sizing or spacing values here}&gt;<br>        {Content goes here}<br>      &lt;/Grid&gt;<br>    &lt;/Grid&gt;<br>  );<br>}</pre><h3>Migrating to Material UI Grid v2</h3><p>The <strong>older version of MUI Grid is deprecated</strong>, and it’s recommended that you migrate to Grid v2 for smoother use with intuitive layouts for your project. If you’re curious about why you should use the updated version and migrate, check the following paragraph. Or else, you might want to to skip it.</p><h3>Why You Should Migrate to Material UI Grid v2</h3><p>The latest Grid v2 offers several changes, ease of customization, and fixes difficulties of previous versions. The key considerations are listed below:</p><ul><li>In the MUI Grid v1, there were some limitations with negative margins, spacing issues with full-width items or layout shifting, not creating proper gutter in v5, etc. These problems are fixed in Material UI Grid v2.</li><li>The Grid component has been completely rewritten with <strong>calc() </strong>and CSS variables in Grid v2. As a result, the negative margin spreads equally on all sides by default.</li><li>In MUI Grid v2, Grid is an item itself, which works similarly to the Flexbox in CSS. This new Grid2 automatically handles the size of long texts for its container. So, the <strong>item</strong> and <strong>zeroMinWidth</strong> props are removed, and you can define breakpoints, spacing, or customization values for your layout with less code. <br>-&lt;Grid item zeroMinWidth xs={6}&gt;<br>+&lt;Grid xs={6}&gt;</li><li>The latest version also fixed the limitation on nested grids and added the <strong>offset</strong> prop, which refers to adding space or gaps before a grid item. This ensures the item is positioned further along the row without content directly adjacent to it.</li><li>A new prop called disableEqualOverflow is introduced, which solves the issue of unwanted scrollbars appearing on small viewports. It also lets you <a href="https://mui.com/material-ui/migration/migration-grid-v2/#negative-margins">use the negative margins</a> as the Grid v1 if needed.</li></ul><p>Now that you know about the latest version of MUI Grid, it’s time to start the migration part. Remember that, there are different MUI versions available, and the migration steps and APIs vary for each.</p><h3>Migration for Material UI v4 and v5</h3><p>The MUI Grid v2 was introduced in MUI v5. So, if you are a Material UI v4 user, you need to <a href="https://mui.com/material-ui/migration/migration-v4/">migrate Material UI v4 to Material UI v5</a> to use the MUI Grid v2. Let’s see how to do that:</p><ul><li>First, upgrade the React.js and Typescript versions. Your React version should be updated to at least v17.0.0; if you’re using TypeScript, update it to at least v3.5. Also, update the packages below if your project is using them: <strong>“react-scripts,” “@types/react,” </strong>and<strong> “@types/react-dom”.</strong></li></ul><p>npm install @material-ui/core@^4.11.2 react@^17.0.0<br>or,<br>yarn upgrade @material-ui/core@^4.11.2 react@^17.0.0</p><p><em>:: </em><strong><em>Use at least the Material UI v4.11.2 package and make sure all applications are running correctly before starting all the steps.</em></strong></p><ul><li>Second, set up the <strong>ThemeProvider </strong>at the root of your app.</li><li>Third, install the packages of MUI v5 using the following:</li></ul><p>npm install @mui/material @mui/styles<br>or,<br>yarn add @mui/material @mui/styles</p><ul><li>Install the new packages of <strong>@material-ui/lab</strong> or <strong>@material-ui/icons, </strong>if you’re using them.<br>For <strong>@material-ui/lab:</strong></li></ul><p>npm install @mui/lab<br>or,<br>yarn add @mui/lab</p><ul><li>For <strong>@material-ui/icons:</strong></li></ul><p>npm install @mui/icons-material<br>or,<br>yarn add @mui/icons-material</p><ul><li>Add Emotion packages for the new peer dependencies in MUI v5.</li></ul><p>npm install @emotion/react @emotion/styled<br>or,<br>yarn add @emotion/react @emotion/style</p><p>Once the installation is done and still your app is running without bugs or errors, run <strong>&lt;npm uninstall @material-ui/*&gt;</strong> or <strong>&lt;yarn @material-ui/*&gt;</strong> to remove the old <strong>@material-ui/*</strong> packages.</p><p>When you are done migrating, you can import the following to get the updated Grid v2 –</p><pre>import Grid from &#39;@mui/material/Unstable_Grid2&#39;;</pre><h3>Migration for Material UI v6</h3><p>If you are not a Material UI v6 user, it is recommended to migrate to <a href="https://mui.com/material-ui/migration/upgrade-to-v6/">Material UI v6 from Material UI v5</a> first. It doesn’t take much time, and it is more fun to work with Material UI v6. When you’re a Material UI v6 user, you can follow the guidelines below:</p><p>The Grid component has been stabilized and is marked as stable in Material UI v6, so the unstable prefix for the Grid is removed in MUI v6. You can use the following:</p><pre>import Grid from &#39;@mui/material/Grid2&#39;;<br>//or<br>import { Grid2 } from &#39;@mui/material&#39;;</pre><p>Besides the stabilization, MUI v6 has also been improved with <a href="https://mui.com/material-ui/migration/upgrade-to-v6/#grid2">Grid v2 properties</a><strong>. </strong>The size and offset properties for corresponding breakpoints have been renamed. Hence, writing code has become easier with MUI v6, enhancing the development experience.</p><pre>&lt;Grid size={{ xs: 12, sm: 6 }} offset={{ xs: 2, sm: 3 }}&gt;</pre><p>You can also use custom breakpoints using the following</p><pre>&lt;Grid size={{ mobile: 12, desktop: 6 }} offset={{ mobile: 2, desktop: 4 }}&gt;</pre><p>It will ensure the viewports for mobile and desktop screens are occupied according to given breakpoint values.</p><p>Moreover, v6 removes the need for the disableEqualOverflow prop for the Grid component, as the child Grid, correctly contains its parents’ padding.</p><p>If you need more details about migration to MUI Grid v2, please check <a href="https://mui.com/material-ui/migration/migration-grid-v2/">the migration guide</a>.</p><h3>Limitation</h3><p>Despite fixing some major issues of the previous version of MUI Grid, the size and offset props are not supported within the containers using direction=&quot;column” and direction=&quot;column-reverse.” So, the column and column-reversing issues remain.</p><p>The size and offset props define the number of columns a component uses for a given breakpoint and control the width using flex-basis in row containers. However, they impact the height of the column containers and may unexpectedly affect the height of the grid item elements.</p><h3>Incorporate Material UI Breakpoints in Grid v2 for Intuitive Layout</h3><p>MUI grids are an excellent tool for precisely and uniformly spacing items on web pages. Each grid width is a specific percentage of the grid’s 12-column layout. Additionally, MUI has breakpoints used internally in the components to <a href="https://themewagon.com/blog/best-ways-to-use-media-query-breakpoints-with-3-frameworks-in-2023/">create responsive layouts</a>. They ensure the column widths adapt to various devices without breaking the orientation. You can control the layouts of your application through the Grid component. The default breakpoints for different screens and the available props for utilizing those are listed below.</p><p>Default Breakpoints:</p><ul><li>xs, for extra-small screens: <strong>0-599</strong> px</li><li>sm, for small screens: <strong>600-899</strong> px</li><li>md, for medium screens: <strong>900</strong> px</li><li>lg, for large screens: <strong>1200</strong> px</li><li>xl, for extra-large screens: <strong>1536</strong> px</li></ul><p>Available Props:</p><ul><li><strong>size</strong></li><li><strong>columns</strong></li><li><strong>columnSpacing</strong></li><li><strong>direction</strong></li><li><strong>rowSpacing</strong></li><li><strong>spacing</strong></li><li><strong>offset</strong></li></ul><p>Look into the example of Grid customization with the breakpoints.</p><pre>import React from &#39;react&#39;;<br>import { Grid2 } from &#39;@mui/material&#39;;</pre><pre>function MyComponent() {<br>  return (<br>      &lt;Grid container size={{ xs: 4, sm: 8, md: 12 }}&gt;<br>               {/* your content here*/}<br>      &lt;/Grid&gt;<br>  );<br>}</pre><p>In this example, we created a simple grid container for extra-small, small, and medium screens that take width according to the values given. The grid container occupies approximately 34% {xs:4} of the smaller or extra-small screen’s viewport, where it occupies approximately 67% {sm:8} for a small screen and 100% {md:12} for a medium screen’s available viewport.</p><h3>Details on the Features of MUI Grid v2</h3><p>MUI Grid v2 includes the same features as MUI Grid, such as the fluid grid, spacing, auto-layout, and nested grid. Let’s get a grasp on the MUI Grid v2 features.</p><h3>Fluid Grid</h3><p>The fluid grid in Material UI is a layout that dynamically scales the contents of your webpage. It utilizes the breakpoints to determine the requirements for the layout modifications. A fluid grid expands the layouts based on available spaces by adjusting proportionally to different screen widths. For example, &lt;size={{ xs: 12, sm: 6 }}&gt; occupies 100% of the available viewport of the small screens (xs) like mobile, as it is defined xs:12, (12 out of 12 columns = full width), and for the screens like tabs (sm), which is bigger than a mobile (xs), the component occupies half of the total viewport.</p><p>Check the example below, where we’ve created two grid items that change the layout at the defined breakpoints:</p><pre>import * as React from &#39;react&#39;;<br>import Grid from &#39;@mui/material/Grid2&#39;;</pre><pre>export default function BasicGrid() {<br>  return (<br>   &lt;Grid container&gt;<br>        &lt;Grid  size={{ xs: 6, sm: 2, md: 8, lg=12, xl=3 }}&gt;<br>          Hooray something is here!<br>        &lt;/Grid&gt;<br>        &lt;Grid size={{ xs: 6, sm: 10, md: 4, lg=12, xl=9 }}&gt;<br>          Hooray something is too!<br>       &lt;/Grid&gt;<br>      &lt;/Grid&gt;<br>  );<br>}</pre><h3>Spacing</h3><p>Spacing controls the space or gutter between the grid items. It adds padding inside the container and ensures the items don’t stick together. You can utilize this feature using the spacing prop. And if you want to convert it into CSS property, use the theme.spacing() helper.</p><p>See the following example for a better understanding:</p><pre>import * as React from &#39;react&#39;;<br>import Grid from &#39;@mui/material/Grid2&#39;;</pre><pre>export default function GridSpacing() {<br>  return (<br>    &lt;Grid container rowSpacing={1} columnSpacing={{ xs: 1, sm: 2, md: 3 }}&gt;<br>      &lt;Grid&gt;<br>        Hooray something is here!<br>     &lt;/Grid&gt;<br>      &lt;Grid &gt;<br>        Hooray something is too!<br>    &lt;/Grid&gt;<br>    &lt;/Grid&gt;<br>  );<br>}</pre><p>Here, the vertical space between the grid items will be 8px (as the spacing is 8px by default) and the horizontal space will be 8px for the extra-small screens, 16px (2*8) for the small screens, and 24px (3*8) for the medium screens.</p><h3>Auto-Layout</h3><p>The grid items can automatically resize and fill the available space using the auto-layout feature. It eliminates the need to specify an item’s width. If the width of one of the items is set to a fixed value, the remaining child items will automatically resize and share the available space for them.</p><p>For instance:</p><pre>import * as React from &#39;react&#39;;<br>import Grid from &#39;@mui/material/Grid2&#39;;</pre><pre>export default function AutoGrid() {<br>  return (<br>      &lt;Grid container spacing={3}&gt;<br>        &lt;Grid&gt;<br>          &lt;Item&gt;A&lt;/Item&gt;<br>        &lt;/Grid&gt;<br>        &lt;Grid size={7}&gt;<br>          &lt;Item&gt;B&lt;/Item&gt;<br>        &lt;/Grid&gt;<br>        &lt;Grid&gt;<br>          &lt;Item&gt;C&lt;/Item&gt;<br>        &lt;/Grid&gt;<br>      &lt;/Grid&gt;<br>  );<br>}</pre><p>In this example, there are three child items, and the size for the second one is defined. The remaining two children will automatically occupy the available space to align with the viewport.</p><h3>Nested Grid</h3><p>The nested grid feature of the Material UI Grid System is generally used for complex structures or designs. A nested grid container must be the direct child of a root or parent grid container. Otherwise, if any items are defined between them, the second grid container will act as the new root container.</p><p>See the example below:</p><pre>&lt;Grid container&gt;<br>  &lt;Grid container&gt; // A nested grid container that inherits columns and spacing from above.<br>    &lt;div&gt;<br>      &lt;Grid container&gt; // A new root grid container with its own variable scope.</pre><p>The nested grid container inherits the columns and spacing props. If these props are not specified for the instances, the child grid inherits the row spacing and columns from its parent.</p><h3>Customizing Material UI Grid Column Number</h3><p>MUI allows you to customize column numbers when implementing designs that do not use the default 12-column grid. You can use the columns prop to change the number of columns. It helps you get more flexibility.</p><p>See the following example to see how it’s done:</p><pre>export default function ColumnsGrid() {<br>  return (<br>      &lt;Grid container columns={15}&gt;<br>        &lt;Grid size={7}&gt;<br>          &lt;Item&gt;A&lt;/Item&gt;<br>        &lt;/Grid&gt;<br>        &lt;Grid size={8}&gt;<br>          &lt;Item&gt;B&lt;/Item&gt;<br>        &lt;/Grid&gt; <br>      &lt;/Grid&gt;<br>  );<br>}</pre><p>This code snippet will create 15 columns with items A and B, where A takes around 47% and B takes around 53% of the screen width.</p><h3>Making a Simple Responsive Card with Material UI Grid v2</h3><p>Since we have learned quite a lot about MUI grid systems and grid v2, let’s explore making a real-life example like a responsive card.</p><p><a href="https://stackblitz.com/edit/muicard-pstbfe?embed=1&amp;file=Demo.tsx">https://stackblitz.com/edit/muicard-pstbfe?embed=1&amp;file=Demo.tsx</a></p><pre>import React from &#39;react&#39;;<br>import { Card, CardMedia } from &#39;@mui/material&#39;;<br>import Grid  from &#39;@mui/material/Grid2&#39;;<br><br>function ImageGallery() {<br>  return (<br>    &lt;Grid container spacing={2}&gt;<br>      {[1, 2, 3, 4, 5, 6].map((item) =&gt; (<br>        &lt;Grid size={{ xs: 12, sm:6, md:4 }} key={item}&gt;<br>          &lt;Card&gt;<br>            &lt;CardMedia<br>              component=&quot;img&quot;<br>              alt={`Image ${item}`}<br>              height=&quot;140&quot;<br>              image={`https://placehold.co/600x400`}<br>            /&gt;<br>          &lt;/Card&gt;<br>        &lt;/Grid&gt;<br>      ))}<br>    &lt;/Grid&gt;<br>  );<br>}<br><br>export default ImageGallery;</pre><p>This example creates an image gallery with 6 cards and provides a responsive layout for different viewports.</p><p>As Johann Wolfgang von Goethe said, “In the end, we retain from our studies only that which we practically apply.” This blog has enlightened you on the basic usability of the powerful grid system of your favorite Material UI and how to utilize it in your project without getting confused about the core concepts.</p><p>So, it’s time to put your knowledge to testing and deployment and transform your developer experience from beginner to master. Start with the prebuilt <a href="https://themewagon.com/theme-framework/material-ui/">Material UI dashboard templates</a> and enjoy hassle-free development process along with complete customizability.</p><h3>Material UI Grid v2: FAQs Answered</h3><ul><li><strong>Does Material UI Grid use CSS Grid?</strong></li></ul><p>The Material UI Grid uses CSS flexbox rather than the CSS grid. But the latest versions of MUI grid don’t support row spanning. So, to span the children elements in multiple rows, MUI grid uses a CSS grid. The MUI grid also uses CSS grid when needing an auto-placement of children element.</p><ul><li><strong>Is MUI Grid is a component?</strong></li></ul><p>Yes, the MUI Grid is a React component provided by the Material-UI (MUI) library. It is part of the MUI system for building responsive layouts using CSS flexbox under the hood. Grid is a system to build responsive layouts, and it is implemented using the grid component.</p><ul><li><strong>Can Grid be both a container and an item?</strong></li></ul><p>Yes, in the case of nested grids, the MUI grid can act as the container and item. The outer grid acts as a container, the inner grid acts as both an item (inside the outer container) and a container (for nested items).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f30359068ad7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[8+ In-house MUI Admin Themes to Ace Your Business]]></title>
            <link>https://themewagonblog.medium.com/8-in-house-mui-admin-themes-to-ace-your-business-8be6b87ecb27?source=rss-14635811f586------2</link>
            <guid isPermaLink="false">https://medium.com/p/8be6b87ecb27</guid>
            <category><![CDATA[material-ui]]></category>
            <category><![CDATA[admin-dashboard]]></category>
            <category><![CDATA[mui]]></category>
            <category><![CDATA[responsive-web-design]]></category>
            <category><![CDATA[admin-dashboard-templates]]></category>
            <dc:creator><![CDATA[ThemeWagon]]></dc:creator>
            <pubDate>Thu, 05 Sep 2024 06:26:38 GMT</pubDate>
            <atom:updated>2024-09-05T06:49:22.604Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tKtpPMJHVtSr2i290Ct0Hg.png" /></figure><p>MUI admin themes are becoming popular among potential developers due to their scalable and extraordinary performance in data management systems. They secure productivity and code maintainability with built-in, rich, customizable components. They offer a component-based approach to creating responsive and user-friendly admin panels, ensuring efficiency in your business. Moreover, MUI dashboard themes help you manage and <a href="https://themewagon.com/blog/material-ui-with-5-mui-templates/">maintain administration efficiently</a> with all the necessary tools at your fingertips.</p><p>ThemeWagon has created free Material UI admin dashboard templates to help you keep up with the growing popularity of MUI themes and expedite your development process. These templates facilitate easier data management and uphold sustainable data visualization<strong> </strong>across different parts of the admin panel with similar-looking user interfaces.</p><p>Furthermore, these free templates are responsive flawlessly and remain cross-browser compatible in your admin panel. Let’s explore these free templates!</p><h3>Free React MUI Admin Template</h3><p>MUI themes offer a powerful combination of modern design and ease of efficiency, leveraging the strengths of both MUI and React. The <a href="https://themewagon.com/blog/exclusive-home-brewed-free-templates/">latest in-house</a> MUI-React admin dashboard templates are presented below, which can be readily customized to align with your branding at any time.</p><h3>Elegent</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JWqVnah8yshtSNqIQI-HWw.png" /><figcaption>Elegent — Free Material UI React Admin Dashboard Template</figcaption></figure><p>Elegent is a free admin dashboard template built with Material UI and React. Its light color palette helps with soothing eye navigation. To visualize data, the mobile-first design has several responsive UIs, including charts, graphs, tables, etc.. The multipage template is suitable for e-commerce and other online data management projects.</p><p><a href="https://themewagon.github.io/elegent/">Preview</a> <a href="https://themewagon.com/themes/elegent/">Download</a></p><h4>Features</h4><ul><li>Material UI</li><li>Reacts Js</li><li>Cross-browser Compatibility</li><li><strong>5+ Pre-Built Pages</strong></li><li><strong>Multilingual Design</strong></li><li>Dropdown Menu Bar</li><li>Fully Responsive</li><li><strong>Multipage Design</strong></li></ul><h3>Motiv.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iXAihSYp7OlqI3UvbgS3Og.png" /><figcaption>Motiv. — Free MUI-React Admin Dashboard Template</figcaption></figure><p>Another in-house MUI admin dashboard template is Motiv., which also fits online data management projects for data visualization. This free template includes progress bars, checkbox UIs, two authentication pages, different sign-in options, a password recovery feature, and many more. It is also a mobile-first design and provides scalable data management for your admin interfaces.</p><p><a href="https://themewagon.github.io/motiv/">Preview</a> <a href="https://themewagon.com/themes/motiv/">Download</a></p><h3>Features</h3><ul><li>Material UI</li><li>React Js</li><li>3+ Pre-Built Pages</li><li><strong>Different Sign-up Options</strong></li><li>Progress Bar</li><li>Dropdown Menu Bar</li><li>Fully Responsive</li><li><strong>Multipage Design</strong></li></ul><h3>Modernize</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eyMxbH65xKQsvkwzq8fEtg.png" /><figcaption>Modernize — Free Material-UI Admin Dashboard Template</figcaption></figure><p>Modernize has a simple but effective layout. The template’s white background ensures a sleek user experience with accessible task management features. This free template is designed to be lightweight and efficient and can scale up the data management process, providing cross-browser compatibility and responsiveness.</p><p><a href="https://themewagon.github.io/modernize-mui-admin/">Preview</a> <a href="https://themewagon.com/themes/modernize-mui/">Download</a></p><h4>Features</h4><ul><li>Material UI</li><li><strong>Multipage Design</strong></li><li><strong>4 Authentication Pages</strong></li><li><strong>Different Sign-up Options</strong></li><li>Cross-Browser-Compatible</li><li><strong>Multilingual</strong></li><li><strong>Blog Section</strong></li><li>Progress Bar</li><li><strong>Pagination UI</strong></li><li><strong>Clean Codebase</strong></li></ul><h3>DashDarkX2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TVscWylyiXCAbm3Mu1rDAA.png" /><figcaption>DashDarkX — Free Material-UI React Admin Dashboard Template</figcaption></figure><p>This MUI-React admin dashboard template has a gorgeous outlook and a dark color palette. DashDarkX’s dark background emphasizes the efficiency of dark mode in this free template. The responsive design ensures the dashboard works well on various devices and screen sizes. This <a href="https://themewagon.com/blog/25-free-creative-agency-html5-website-templates/">free and responsive template</a> also has a well-documented codebase, providing easy customization for your design goals.</p><p><a href="https://themewagon.github.io/dashdarkX/">Preview</a> <a href="https://themewagon.com/themes/dashdarkx/">Download</a></p><h4>Features</h4><ul><li>Material UI</li><li>React Js</li><li>3+ Pre-Built Pages</li><li><strong>Different Sign-Up Options</strong></li><li><strong>Pagination UI</strong></li><li>Progress Bar</li><li>Drop-down Menu Bar</li><li>Fully Responsive</li></ul><h3>Get Better Insights into MUI and Admin Dashboard Templates:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*82wNHskR2Vq4mB8h.png" /><figcaption><a href="https://themewagon.com/blog/the-ultimate-guide-to-choosing-between-material-ui-bootstrap-tailwind-css/">A Guide to Choose from Material UI, Bootstrap, &amp; Tailwind CSS</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*H5Srn0wK846RnVyn.png" /><figcaption><a href="https://themewagon.com/blog/phoenix-101/">Phoenix 101: Exploring the Admin &amp; WebApp Template</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*LloLeo7skn1xq6uT.png" /><figcaption><a href="https://themewagon.com/blog/falcon-102/">Falcon 102: Exploring the React Version of Falcon Admin &amp; WebApp Template</a></figcaption></figure><h3>Dabang</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BheHzUPHDzk3DoYTM7yQMA.png" /><figcaption>Dabang — Free Material UI React Admin Dashboard Template</figcaption></figure><p>Dabang is an MUI theme that boasts multilingual efficacy. The simple interface is designed with the analytics of real-time insights and reports on the website’s or mobile app’s performance and user behavior. Furthermore, the mobile-first design enhances usability with a well-thought-out interface, simplifying complex tasks.</p><p><a href="https://themewagon.github.io/dabang/">Preview</a> <a href="https://themewagon.com/themes/dabang/">Download</a></p><h4>Features</h4><ul><li>Material UI</li><li>React Js</li><li>Google Font</li><li><strong>3+ Pre-Built Pages</strong></li><li><strong>PagesSpeed Optimized</strong></li><li><strong>Mobile-First Design</strong></li><li><strong>Multipage Design</strong></li><li><strong>Multilingual Design</strong></li><li>Cross-Browser-Compatible</li><li><strong>Different Sign-in &amp; Sign-up Options</strong></li></ul><h3>BankDash</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ozt23iEps289QzRPXoRp2Q.png" /><figcaption>BankDash — Free Material UI React Admin Dashboard Template</figcaption></figure><p>BankDash, another multilingual dashboard theme, ensures a consistent look across the admin dashboard interfaces. This responsive free MUI-React template has several efficient features to speed development, such as different sign-in and sign-up pages and other data visualization features. Moreover, this multipurpose template is helpful for data management for banks, corporations, and other institutions.</p><p><a href="https://themewagon.github.io/bankdash/">Preview</a> <a href="https://themewagon.com/themes/bankdash/">Download</a></p><h4>Features</h4><ul><li>Material UI</li><li>React Js</li><li>Google Font</li><li>Favicon</li><li><strong>4+ Pre-Built Pages</strong></li><li><strong>Fully Responsive</strong></li><li><strong>Multipage Design</strong></li><li>Side-Navigation Bar</li><li>Cross-Browser-Compatible</li><li><strong>Different Sign-in &amp; Sign-up Options</strong></li></ul><h3>DNX</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZWhEmzIZ-XCy5_bqJ_zHw.png" /><figcaption>DNX — Free MUI React Admin Dashboard Template</figcaption></figure><p>DNX is another ideal template for your e-commerce or corporate business, providing better data visualization. The multipage design has many responsive UIs, like different sign-in and sign-up options, a calendar, a pagination UI, a dropdown menu bar, two authentication pages, a side navigation bar, and many more. This cross-browser-compatible design has fewer bugs and is accessible across all available browsers.</p><p><a href="https://themewagon.github.io/dnx/">Preview</a> <a href="https://themewagon.com/themes/dnx/">Download</a></p><h4>Features</h4><ul><li>Material UI</li><li>React Js</li><li>Google Font</li><li><strong>3+ Pre-Built Pages</strong></li><li><strong>2 Authentication Pages</strong></li><li>Multipage Design</li><li><strong>Multilingual Design</strong></li><li>Page-Speed Optimized</li><li>Fully Responsive</li><li><strong>Different Sign-in &amp; Sign-up Options</strong></li></ul><h3>Nickelfox</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Pgt75dIxHvTMOn2ulnoVA.png" /><figcaption>Nickelfox — Free MUI React Sales Dashboard Template</figcaption></figure><p>This in-house MUI <a href="https://themewagon.com/theme-category/admin-dashboard/">admin dashboard</a> template is designed with features to track sales management or other data activities. The design is well-decorated, with a clean codebase and easy customization. It enhances user engagement by providing faster loading times and reducing bounce rates. Additionally, the dark outlook of this flexible theme enhances the eye-soothing and easy navigation across the pages.</p><p><a href="https://themewagon.github.io/nickelfox/">Preview</a> <a href="https://themewagon.com/themes/nickelfox/">Download</a></p><h4>Features</h4><ul><li>Material UI</li><li>React Js</li><li>Google Font</li><li>3+ Pre-Built Pages</li><li><strong>Different Sign-in &amp; Sign-up Options</strong></li><li>Progress Bar</li><li>Toggle Switch</li><li>SEO-Friendly</li><li>Fully Responsive</li><li><strong>Multipage Design</strong></li></ul><h3>Venus</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oxkBe9ldclqPnGl1GngUOA.png" /><figcaption>Venus — Free Multipage Material UI Admin Dashboard Template</figcaption></figure><p>This is an MUI dashboard template with a simple design for enhanced data visualization. This is also a multilingual theme and the theme is rich with several responsive UIs like progress bars, charts, pagination UI, different sign-in and sign-up options, etc. The responsive design offers faster loading time with reduced bounce rates. Moreover, it is ideal to help you rank higher in the search engine with e better user engagement.</p><p><a href="https://themewagon.github.io/venus/">Preview</a> <a href="https://themewagon.com/themes/venus/">Download</a></p><h4>Features</h4><ul><li>Fully Responsive</li><li><strong>Multipage Design</strong></li><li><strong>Multilingual Design</strong></li><li>Page-Speed Optimized</li><li><strong>Different Sign-in &amp; Sign-up Options</strong></li><li>Material UI</li><li>React Js</li><li>Google Font</li><li><strong>3+ Pre-Built Pages</strong></li><li>Well-Documented Codebase</li></ul><p>These homebrewed templates by ThemeWagon can significantly streamline the setup of your admin panel. They offer complete optimization to ensure <a href="https://themewagon.com/blog/designing-seo-friendly-website-template/">higher search engine ranking</a>. MUI admin dashboard templates allow easy override of the styles to fit the specific needs of the developers and customers. They let your business focus more on functionality and less on design and structure. So, it is a smooth way to create websites using MUI themes and enhance your branding.</p><p>Happy developing with free React-MUI admin dashboard templates!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8be6b87ecb27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Material UI: Exploring 5+ MUI Dashboard Templates]]></title>
            <link>https://themewagonblog.medium.com/introducing-material-ui-exploring-5-mui-dashboard-templates-47f5eaf11722?source=rss-14635811f586------2</link>
            <guid isPermaLink="false">https://medium.com/p/47f5eaf11722</guid>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[admin-templates]]></category>
            <category><![CDATA[material-ui]]></category>
            <category><![CDATA[web-design]]></category>
            <dc:creator><![CDATA[ThemeWagon]]></dc:creator>
            <pubDate>Wed, 10 Jul 2024 07:52:08 GMT</pubDate>
            <atom:updated>2024-07-10T10:33:25.968Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NDtCif788V_nhXdzjt1L8A.png" /></figure><p>Material UI is a design system based on Google’s Material Design language, introduced in 2014, and works with various JavaScript frameworks apart from React, such as Angular.js, Next.js, and Vue.js. Material UI, later rebranded as MUI, is a design system that helps ensure consistent visual language throughout your websites and web apps. Necessarily, MUI dashboard templates are a collection of fully built, out-of-the-box React components for your application that have been developed to ensure quality. They provide many pre-designed built-in UIs, designed following Google’s guidelines and principles to build components.</p><p>We’ll try to explore the basic and advanced features of MUI briefly with the 5 most popular MUI dashboard templates. These pre-built MUI website templates help maintain a consistent visual language throughout your website or application with a modern and user-friendly look, simultaneously ensuring flawless response and intuitive user interaction across pages.</p><p>Let’s get into the details!</p><h3>A Short Glimpse at Material UI</h3><p>Material UI, an open-source framework, was introduced in 2014 to empower React developers with more engaging and fascinating user interfaces. It was developed implementing <a href="https://m3.material.io/">Google’s Material Design Guidelines</a>. To reduce confusion regarding the brand identity, the framework was rebranded into MUI, which is shorter, familiar, resembles the organization’s focus, and works properly.</p><p>MUI is not directly linked to material design. It is more than material UI and covers a broader area. Material is the foundation or base of MUI. MUI’s component architecture and API design prioritize React-specific patterns and best practices, following this Material Design by Google. MUI also integrates a different design philosophy that evolves around new web technologies and trends, ensuring compatibility with modern React practices and optimizing performance for real-world applications. MUI templates make it easy for developers, designers, and clients to achieve this.</p><h3>Basic Features of MUI Website Templates</h3><p>MUI was introduced to enhance the user interface(UI) to empower React developers, but later, the focus shifted to intensify the design and developer experience (DX). Additionally, MUI templates made it more accessible to the mass community so that they could utilize its useful features. Some of the basic features that MUI templates offer are:</p><ul><li><strong>Component Library:</strong> The MUI system provides a set of CSS utilities with prebuilt components and unique feature lists. It also offers a set of flexible generic wrapper components, like Box or Container, that let you design directly without wasting much time in coding.</li><li><strong>Theming &amp; Customization:</strong> MUI templates offer powerful theming capabilities and customization options to reflect your brand. With the versatile customization of the pre-built components, MUI allows you to create a custom theme. By defining a custom theme and using it consistently across your application, you can also reduce redundancy and optimize the CSS output in the bundle.</li><li><strong>Accessibility: </strong>MUI templates are ARIA-compliant with their pre-built and ready-to-use components, which include an out-of-the-box keyboard. The components allow users to navigate in a simple but easy way, so developers can effortlessly make the site accessible to more people.</li><li><strong>Design System: </strong>The root or foundation of the MUI template is the Material Design system created by Google. MUI empowered React developers to build effective Material Design, implementing Google’s Material Design guidelines to build customer-facing applications, internal tools, and mobile-hybrid apps. But now, it is responsible for a whole suite of products they can design themselves. The in-house styling solutions allow designers to create a design, maintain its consistency with the codebase, and make the website flawless.</li></ul><h3>Advanced Features of MUI Website Templates</h3><p>MUI was introduced to match the growing necessities of the Material UI Design community, but now it offers far beyond that. It offers an advanced set of tools that provides fast delivery of new features. Let’s get into the details:</p><ul><li><strong>Responsiveness</strong>: MUI templates use grids that make layout creation flexible and straightforward, and enable the creation of complex layouts with ease. On the other hand, it integrates form APIs like React Hook Form, validation libraries such as ZOD, Formik, Yup, many authentication functions, typescripts, etc. that help to collaborate designers with backend developers without barriers and provide an extensive developer experience.</li><li><strong>Server-Side Rendering (SSR)</strong>: Server-side rendering (SSR) of Material UI involves rendering Material UI components on the server side before sending the HTML to the client. It offers many benefits, such as improved performance, SEO optimization, and better initial loading times for users, etc. MUI templates integrate well with Server-Side Rendering (SSR) frameworks. For example, Next.js for React, Nuxt.js for Vue.js, Angular Universal for Angular, etc. This framework support of MUI helps to implement material UI components on the server naturally, maintaining flexibility and complexity.</li><li><strong>Integration:</strong> MUI works with other JavaScript frameworks such as — Angular.js, Next.js, jQuery, Vite.js, and Vue.js, enabling developers to leverage its components and styling capabilities across different tech stacks. Some key aspects of advanced integration are:</li></ul><ol><li><strong>Styling</strong>: MUI uses a CSS-in-JS approach (via JSS — JavaScript Style Sheets) for styling, which offers scoped styles and dynamic theming capabilities. It also uses the <strong>&lt;ThemeProvider&gt;</strong> component to apply custom themes across your entire application or specific parts.</li><li><strong>Interaction</strong>: MUI utilizes advanced routing techniques with frameworks like React Router or Next.js for seamless navigation within your Material UI application. Furthermore, MUI offers a responsive grid system (<strong>&lt;Grid&gt;</strong> Component) for complex layouts that adapt to different screen sizes.</li><li><strong>Internationalization</strong>: MUI supports internationalization and localization through libraries like <strong>&lt;@mui/material/locale&gt;</strong> and integration with i18n libraries such as react-intl or i18next.</li></ol><ul><li><strong>Ecosystem &amp; Extensions:</strong> MUI was introduced to match the growing necessities of the Material UI Design community, but now it offers far beyond that. They offer an advanced set of tools that quickly ship new features. The service is divided into 2 product lines. They are MUI Core, the foundational Material Design, and MUI X, which offers advanced components such as data grids, date and time pickers, tree view, charts, etc. These components feature advanced functionality for data-rich applications and other use cases. Moreover, MUI X works seamlessly with MUI Core and extends the functionality of its UIs while standing on their own.</li><li><strong>Performance: </strong>MUI templates offer intuitive performance by reducing bundle size. The strategies MUI applies are:</li></ul><ol><li><strong>Tree-shaking</strong>: Tree-shaking is one of the significant strategies for reducing bundle size. MUI uses ES6 module syntax that is compatible with tree shaking and allows unused code to be eliminated during the bundling process. But, for that, the bundle should support tree shaking.</li><li><strong>Component Importing</strong>: MUI imports only the components needed for a particular design rather than the entire library, which reduces bundle size by excluding unused components. A sample code is given below: <br>import Button from &#39;@mui/material/Button&#39;;<br>import TextField from &#39;@mui/material/TextField&#39;;</li></ol><p>In addition, using a bundle analyzer, optimizing production builds, and compressing JavaScript and CSS files effectively reduces the bundle size in MUI and enhances performance.</p><p><strong>Check Out the Latest Free MUI Dashboard Templates by ThemeWagon:</strong></p><ul><li><a href="https://themewagon.com/themes/motiv/"><em>Motiv.</em></a><em>, designed by </em><a href="https://www.figma.com/@rushituiux"><em>Rushit Dhameliya</em></a><em> for the Figma Design Community, is </em><a href="https://themewagon.com/theme-price/free/"><em>a free MUI dashboard </em></a><em>template built using the Material UI framework.</em></li><li><a href="https://themewagon.com/themes/dashdarkx/"><em>Dashdark X</em></a><em>, designed by </em><a href="https://www.figma.com/@malik_ali"><em>Malik Ali</em></a><em> for the Figma Design Community, is an admin dashboard template built using the Material-UI framework.</em></li><li><a href="https://themewagon.com/themes/modernize-mui/"><em>Modernize</em></a><em> is an </em><a href="https://themewagon.com/theme-category/admin-dashboard/"><em>admin dashboard</em></a><em> template designed by </em><a href="https://www.figma.com/@sejal_ui_ux"><em>Seju</em></a><em> for the Figma Design Community. It is built using the Material-UI framework.</em></li><li><a href="https://themewagon.com/themes/elegent/"><em>Elegent</em></a><em> is an admin dashboard template designed by </em><a href="https://www.figma.com/@malik_ali"><em>Malik Ali</em></a><em> for the Figma Design Community. It is built using the Material-UI framework by ThemeWagon.</em></li></ul><h3>Ideal Usages of MUI Website Templates</h3><p>MUI provides a massive UI component library for open-source projects. Let’s dive into the versatile usability and contributions to efficient UI design and development provided by MUI:</p><h3>Enterprise Applications</h3><p>Enterprise applications require complex and scalable UIs and custom styling and theming to match the corporate branding. MUI offers a highly customizable and easy-to-integrate component library. Its modular and scalable architecture supports the development of complex UIs for large-scale applications and provides layout utilities, error handling, validation support, etc. These theming styles and consistent design approaches make it well-suited for enterprise applications.</p><h3>eCommerce Platforms</h3><p>MUI has an exclusive ability to boost engagement and empower users, which is highly beneficial for e-commerce platforms. Its grid, card, form validation libraries, and other components can be used to make an intuitive display of products, shopping carts, checkouts, product search, and order options. Moreover, MUI’s grid system ensures great responsiveness and a better website outlook regardless of screen size. Additionally, these interactive features ensure better product marketing.</p><h3>Prototyping &amp; Design Consistency</h3><p>App prototyping is a crucial point and the first step before development. Sticking to a clear design plan is important to maintain consistency and a similar outlook in the prototype. One of the significant popularity of MUI is design consistency, which resonates well with prototyping tactics for the developer. Since MUI maintains a consistent design with standard elements throughout the web pages, it makes product updates and design changes simple while maintaining the same approach for developers.</p><h3>In-depth Look into 5+ Official MUI Dashboard Templates</h3><p>Let’s explore the features and functionalities of Material UI discussed above using the 5 most efficient and official MUI Dashboard Templates:</p><h3>Minimal</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NYapJV_94FI-nUj_AG-oaA.png" /><figcaption><a href="https://mui.com/store/items/minimal-dashboard/">Minimal — Client and Admin Dashboard</a></figcaption></figure><p>Minimal, client, and admin dashboard is a fully functional MUI template with 1000+ features. This is a premium MUI template powered by <a href="https://mui.com/">Material UI</a>. The template has rich code quality, and the intuitive design ensures a sleek user experience with modern technical proficiency. It covers the following categories you may consider before implementing minimal to your project.</p><p><strong>Features</strong></p><ul><li>Live Customization Enabled</li><li>RTL &amp; LTR Support</li><li>Different Layout Style</li><li>5 Authentication systems</li></ul><p><strong>Quality</strong></p><ul><li>Standard Codebase</li><li>Clean &amp; Complete Design</li><li>Impressive Customization</li><li>Continuous Upgrade</li></ul><p><strong>Libraries</strong></p><ul><li>React Hook Form</li><li>ZOD Form Validation Library</li><li>ESLint JavaScript linting utility</li><li>Prettier Integrated</li></ul><h4>Remarks</h4><p>Minimal effortlessly accomplishes the needs of developers and users. The meticulous design and intuitive features are made to streamline the workflow of any business. It will effortlessly accommodate your needs with intuitive features that simplify the workflow.</p><h3>Devias Kit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Opnic_JOV1y-Ex7Fpzigsw.png" /><figcaption><a href="https://mui.com/store/items/devias-kit-pro/">Dev</a><a href="https://mui.com/store/items/devias-kit-pro/">ias Kit — Client and Admin Dashboard</a></figcaption></figure><p>DeviasKit, client, and admin dashboard is another fully functional MUI template by <a href="https://mui.com/">Material UI</a>. It is also a premium template with rich code quality. This is a professional Next.js and Vite.js template with 85 individual components, including a toaster, 5 authentication systems, animation, a text editor, and many more. This MUI template’s flexibility and feature availability help developers find the best one according to different requirements.</p><p><strong>Features</strong></p><ul><li>Live Customization Enabled</li><li>RTL &amp; LTR Support</li><li>Different Layout Style</li><li>5 Authentication systems with 2 different styling</li></ul><p><strong>Quality</strong></p><ul><li>Standard Codebase</li><li>Impressive Customization</li><li>Rich Feature Availability</li><li>Clean &amp; Complete Design</li><li>Continuous Upgrade</li></ul><p><strong>Libraries</strong></p><ul><li>React Hook API</li><li>ZOD integrated.</li><li>React Context API</li><li>Sonner Toaster</li><li>Framer Motion</li></ul><h4>Remarks</h4><p>DeviasKit has a very clean and organized codebase with great examples. It keeps updating design trends to Next.js and other libraries. Its easy customization seamlessly integrates with your business, so you can focus on your business coding.</p><h3>Mantis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abzwImaRsf453y7p9Af2yQ.png" /><figcaption><a href="https://mui.com/store/items/mantis-react-admin-dashboard-template/">Mantis — React Material UI Dashboard Template</a></figcaption></figure><p>Mantis is another MUI dashboard template with continuous updates. The React Material UI template has great customizability and design quality. This is also a premium template with a rich code quality. This is a professional Next.js and Vite.js template with <strong>80 individual component packages</strong>, 5 conceptual Apps like E-commerce, Chat, User Management, Social Profile and Calendar, and many more. The responsive template offers a retina-ready display regardless of screen size.</p><p><strong>Features</strong></p><ul><li>Live Customization Enabled</li><li>RTL &amp; LTR Support</li><li>Different Layout Style</li><li>4 Authentication Systems</li></ul><p><strong>Quality</strong></p><ul><li>Standard Codebase</li><li>Clean &amp; Complete Design</li><li>Impressive Customization</li><li>Rich Feature Availability</li></ul><p><strong>Libraries</strong></p><ul><li>React Hook Form</li><li>React Router</li><li>4 Authentication Systems</li><li>SWR &amp; React Context API</li></ul><h4>Remarks</h4><p>Mantis is easy for newbies to start, and the design looks very clean. It is a well-suited template for enterprise applications with great responsiveness. It is compatible with Chrome, Mozilla, Edge, Safari (macOS), and Opera browsers.</p><h3>Berry</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hhWVkbtS0OrA5Gle2qvQNA.png" /><figcaption><a href="https://mui.com/store/items/berry-react-material-admin/">Berry — React Material UI Dashboard Template</a></figcaption></figure><p>Berry is a beautiful React Admin Template with many ready-to-use blended Material UI components. The template helps you create your backend application even faster than before. The React v18 supported template is suitable for building the User Management app, Chat app, Customer-centric app, SaaS-based interface, and many more with high-performance code &amp; fully responsive designs.</p><p><strong>Features</strong></p><ul><li>Live Customization Enabled</li><li>RTL &amp; LTR Support</li><li>Different Layout Style</li><li>4 Authentication Functions</li></ul><p><strong>Quality</strong></p><ul><li>Standard Codebase</li><li>Clean &amp; Complete Design</li><li>Impressive Customization</li><li>Rich Feature Availability</li></ul><p><strong>Libraries</strong></p><ul><li>React Hook Form</li><li>Form Validations</li><li>Form Wizards</li><li>4 Authentication Methods</li></ul><h4>Remarks</h4><p>Berry is a page-speed-optimized template using Google Page Speed and GTMetrix tools. Additionally, it is compatible with browsers such as — Chrome, Mozilla, Edge, Safari (macOS), and Opera. The template effortlessly accomplishes the needs of developers and users.</p><h3>Mira Pro</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iTybcyRBJcHeAJthN-I2Zw.png" /><figcaption><a href="https://mui.com/store/items/mira-pro-react-material-admin-dashboard/">Mira Pro — React Material Admin Dashboard</a></figcaption></figure><p>Mira Pro is another professional React Dashboard Template with plenty of ready-to-use Material UI components and features. The template has SaaS-based interfaces that provide the best outcome for E-Commerce and analytics application websites. Moreover, the clean codebase and extensive design quality help your team move faster and save on development costs.</p><p><strong>Features</strong></p><ul><li>Live Customization Enabled</li><li>RTL &amp; LTR Support</li><li>Different Layout Style</li><li>4 Authentication Systems</li><li>Multilanguage Support</li></ul><p><strong>Quality</strong></p><ul><li>Standard Codebase</li><li>Clean &amp; Complete Design</li><li>Impressive Customization</li><li>Rich Feature Availability</li><li>Continuous Upgrade</li></ul><p><strong>Libraries</strong></p><ul><li>React Hook Form</li><li>ESLint JavaScript Linting Utility</li><li>Prettier Integrated</li><li>Formik &amp; YUP validationUifort</li></ul><h4>Remarks</h4><p>The quality of the Mira Pro template’s codebase is top-tier. End product quality is also top-tier. Documentation is quality.</p><h3>Honorary Mention</h3><p>In addition to the templates explored above, we have Uifort, a MUI dashboard template that’s popular among most MUI users. Hence, we’re adding it to the existing list of official store templates as an honorary mention.</p><h3>Uifort</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xJvigfavOzscYjTRob7H1g.png" /><figcaption><a href="https://mui.com/store/items/uifort-react-admin-dashboard-template/">Uifort — Client React and Admin Dashboard Template</a></figcaption></figure><p>Uifort is a simple but exclusive React Dashboard template for the admin and client of your website. The intuitive design empowers developers and designers, simplifying their jobs. This professional template was built with modern technologies and tailored for Next.js and Vite.js.</p><p><strong>Features</strong></p><ul><li>RTL &amp; LTR Support</li><li>Different Layout Styles</li><li>Multilanguage Support</li></ul><p><strong>Quality</strong></p><ul><li>Clean &amp; Complete Design</li><li>Impressive Customization</li><li>Continuous Upgrade</li></ul><p><strong>Libraries</strong></p><ul><li>React Hook Form</li><li>ZOD form validation</li><li>Supabase Authentication</li></ul><h4>Remarks</h4><p>The template’s simple design offers great flexibility and easy customization. It is suitable for enterprise-level user interfaces.</p><h3>Pros &amp; Cons of Using MUI Dashboard Templates</h3><p>As we can see, MUI offers many benefits, such as large community support, extensive documentation, theming, backend development support, and so on. But it also has some drawbacks. The benefits and drawbacks of using MUI are discussed below:</p><h3>Benefits of Using MUI Dashboard Template</h3><p>Many developers are switching to MUI because of the large component library. It also offers many proficiencies, such as:</p><ul><li>MUI templates ensure a consistent and polished outlook across the website.</li><li>They offer plenty of pre-built components, saving development time and effort.</li><li>Generally, MUI templates are built to be responsive out of the box.</li><li>Material UI has a large community of developers, so getting community support with necessary resources, tutorials, and community-generated components to enhance your project is much easier.</li><li>MUI offers cross-team collaboration that streamlines the workflow and boosts consistency between designers and developers.</li><li>The codes are easier to maintain, and debugging is easier.</li></ul><h3>Drawbacks of Using MUI Dashboard Template</h3><p>MUI provides a powerful component library for creating amazing user interfaces, although it may not facilitate all projects. Some factors to consider while working with MUI are as follows:</p><ul><li>Most of the MUI templates now have licensing restrictions. Before using them in commercial projects, you must check the licensing terms.</li><li>MUI templates save time in customizing, but understanding effective customization and integrating them into your specific project may require some learning, especially for developers new to Material UI.</li><li>Depending on the implementation, there could be performance implications, and customizations overloaded with unnecessary components or styles could impact loading times.</li><li>MUI templates are often built with specific frameworks like React, Angular, etc. If you’re not using one of these frameworks, integration might require additional effort or customization.</li></ul><p>Trusted by thousands of organizations, MUI maintains a cohesive visual style and facilitates rapid prototyping and iteration. MUI templates save you time and money and make your brand look better. They are built to simplify your workflow and boost consistency between designers and developers.</p><p>By leveraging the aforementioned official MUI dashboard templates and customizing them according to your brand’s personality, you can create an extraordinary design for your branding that resonates with your audience.</p><p>Enjoy creating!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47f5eaf11722" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Ways to Use Media Query Breakpoints with 3 Frameworks in 2023]]></title>
            <link>https://themewagonblog.medium.com/best-ways-to-use-media-query-breakpoints-with-3-frameworks-in-2023-87f40e310890?source=rss-14635811f586------2</link>
            <guid isPermaLink="false">https://medium.com/p/87f40e310890</guid>
            <category><![CDATA[responsive-design]]></category>
            <category><![CDATA[media-queries]]></category>
            <category><![CDATA[bootstrap]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[foundation]]></category>
            <dc:creator><![CDATA[ThemeWagon]]></dc:creator>
            <pubDate>Mon, 23 Oct 2023 10:39:09 GMT</pubDate>
            <atom:updated>2023-10-23T10:40:33.303Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5lOo00YgAdrvN0Ce.png" /></figure><blockquote><strong>“Web design is responsive design. Responsive web design is web design, done right.”</strong></blockquote><blockquote><em>— Andy Clarke, creative director, product &amp; website designer</em></blockquote><p>Responsive web design has been around as a <a href="https://themewagon.com/web-design-trends-in-2022/">user interface (UI) design approach</a> for a while now. More and more people are therefore looking for a responsive website or a responsive online presence to conduct their businesses. And with its growth, CSS Media Query Breakpoints have become a familiar name in programming and development.</p><p>The term “responsive design,” coined by Ethan Marcotte, describes using fluid grids, fluid images, and media queries to create responsive content. In fact, media query breakpoints let designers create adaptive and<a href="https://themewagon.com/blog/how-to-make-a-website-responsive-using-bootstrap-html-css/"> responsive designs</a> that will automatically adapt to the browser space to ensure content consistency across devices. Media query introduced breakpoints for the sole purpose of this, and designers implement breakpoints in distinctive styles throughout the framework they’re working with.</p><p>In this article, we’ll try to walk you through the path of media query breakpoints that you might want to be familiar with before opting for a new web dev project or if you are one of us who needs to know their websites or online presence thoroughly.</p><h3>About Media Query</h3><p>Media query is a CSS technique to design responsive content to be presentable on all devices and screens ranging from desktop to mobile. It essentially includes conditions, and the result will be responsive only if the conditions are met. Also, it lets you apply CSS styles depending on a device’s general type or other characteristics like screen resolution or browser viewport width.</p><p>Developers tailor Media-dependent style sheets for different media types ad it consists of a media type and zero or more expression that check for the conditions of particular media features such as, <em>‘width’</em>, <em>‘height’</em>, and <em>‘color’</em> to tailor presentations to a specific range of output devices without changing the content.</p><p>The simplest media query syntax looks like this:</p><pre>@media media-type and (media-feature-rule) {<br>  /* CSS rules go here */<br>}</pre><p>And it consists of the following:</p><ul><li>A media type telling the browser about the kind of media type the code is for</li><li>A media expression, that can be a rule or test to be passed for the contained CSS to be applied</li><li>A set of CSS rules is to be applied if the test passes and the media type is correct.</li></ul><p>Also, the possible types of media to specify are <em>all</em>, <em>print </em>and <em>screen</em>. After specifying the type, you can target media features with a <strong>media rule</strong>. As media features describe the specific characteristics of a given user agent, output device, or environment, they are range features, meaning you can prefix them with <strong><em>‘min-’</em></strong> or <strong><em>‘max-’</em></strong> to express the minimum or the maximum condition constraints.</p><h3>Brief on min-width and max-width</h3><p>The feature detected most often to create responsive designs is viewport width. You can apply CSS if the viewport is above, below, or an exact width, using the <em>min-width</em>, <em>max-width</em>, and <em>width </em>media features.</p><p>You can use these features to create responsive layouts for different screen sizes. As aforementioned, the width and height media features can be used as ranges and be prefixed with min- or max- to indicate the measurement of values. Since it’s more useful to use min-width or max-width to create responsive designs, width, and height are rarely found to be used alone.</p><p>Min-width is the minimum width of a specific viewport, and the simplest code looks like this:</p><pre>@media screen and (min-width: 600px) {<br>    p {<br>        font-size: 16px;<br>    }<br>}</pre><p>The code is specified for when the minimum screen width is 600px or wider. In this case, it’ll resize the fonts to 16px. Any viewport with this screen width will display the paragraph text in the specified size.</p><p>Similarly, with max-width, the code looks like this:</p><pre>@media screen and (max-width: 700px) {<br>  p {<br>    font-size: 25px;<br>  }<br>}</pre><p>In this case, the above code states the alteration of the paragraph’s font size to 25px when the viewport width is 700px or less.</p><h3>About Breakpoints</h3><p>Breakpoints are the predefined points in the code, to which the designed contents respond to adapt to the new viewport size or the device type to display the accurate layout. Media query breakpoints are values for a designer to define in the CSS and are decided either based on the device type or the content type.</p><p>These breakpoints are referred to as media query breakpoints since they are implemented with a media query. With breakpoints in place, website contents will align themselves with screen size and display themselves in a way that facilitates visual consumption.</p><h3>Framework-based Implementation</h3><p>Deciding on an approach to add breakpoints can be tricky as there’s no rule or syntax that’s applicable to all frameworks. Each framework implements these breakpoints in different ways. No two do it the same way, and therefore, different ways to implement breakpoints in different frameworks are briefly described below:</p><h3>Breakpoints in Bootstrap</h3><p>As breakpoints are the building blocks of responsive design, Bootstrap has a very distinct and straightforward approach to implementing breakpoints. Its CSS aims to apply the bare minimum of styles to make the layout work better at the smallest breakpoints, and then layers on styles to adjust the design for larger viewports.</p><p>Bootstrap includes six default breakpoints which are referred to as <strong>‘grid tiers’</strong> sometimes to build responsive designs. These breakpoints can be customized if you’re using the source Sass files. The default Bootstrap breakpoints are as such:</p><pre><br>+----------------------------------+-----------+------------------------+<br>| Breakpoint                       |Class infix| Dimensions             |<br>+----------------------------------+-----------+------------------------+<br>| X-Small                          | None      |  &lt;576px                |<br>+----------------------------------+-----------+------------------------+<br>| Small                            | sm        |  ≥576px                |<br>+----------------------------------+-----------+------------------------+<br>| Medium                           | md        |  ≥768px                |<br>+----------------------------------+-----------+------------------------+<br>| Large                            | lg        |  ≥992px                |<br>+----------------------------------+-----------+------------------------+<br>| Extra large                      | xl        |  ≥1200px               |<br>+----------------------------------+-----------+------------------------+<br>| Extra extra large                | xxl       |  ≥1400px               |<br>+----------------------------------+-----------+------------------------+</pre><p>The breakpoints are customizable with Sass, which can be found in a Sass map in Bootstrap’s official <strong>_variables.scss</strong> stylesheet. You can use the breakpoints in your code as below:</p><pre>$grid-breakpoints: (<br>  xs: 0,<br>  sm: 576px,<br>  md: 768px,<br>  lg: 992px,<br>  xl: 1200px,<br>  xxl: 1400px<br>);</pre><h4>Configuring Min-Width in Bootstrap</h4><p>Bootstrap primarily uses the following breakpoints for layout, grid system, and components:</p><pre>// Source mixins</pre><pre>// No media query necessary for xs breakpoint as it&#39;s effectively <br>`@media (min-width: 0) { ... }`<br>@include media-breakpoint-up(sm) { ... }<br>@include media-breakpoint-up(md) { ... }<br>@include media-breakpoint-up(lg) { ... }<br>@include media-breakpoint-up(xl) { ... }<br>@include media-breakpoint-up(xxl) { ... }</pre><pre>// Usage</pre><pre>// Example: Hide starting at `min-width: 0`, and then show at the `sm` breakpoint<br>.custom-class {<br>  display: none;<br>}<br>@include media-breakpoint-up(sm) {<br>  .custom-class {<br>    display: block;<br>  }<br>}</pre><p>These Sass mixins use the values declared in the Sass variables to translate in the compiled CSS. for instance:</p><pre>// X-Small devices (portrait phones, less than 576px)<br>// No media query for `xs` since this is the default in Bootstrap</pre><pre>// Small devices (landscape phones, 576px and up)<br>@media (min-width: 576px) { ... }</pre><pre>// Medium devices (tablets, 768px and up)<br>@media (min-width: 768px) { ... }</pre><pre>// Large devices (desktops, 992px and up)<br>@media (min-width: 992px) { ... }</pre><pre>// X-Large devices (large desktops, 1200px and up)<br>@media (min-width: 1200px) { ... }</pre><pre>// XX-Large devices (larger desktops, 1400px and up)<br>@media (min-width: 1400px) { ... }</pre><h4>Configuring Max-width in Bootstrap</h4><p>Sometimes media queries are used in Bootstrap to go in the other direction (the given screen size or smaller):</p><pre>// No media query necessary for xs breakpoint as it&#39;s effectively `@media (max-width: 0) { ... }`<br>@include media-breakpoint-down(sm) { ... }<br>@include media-breakpoint-down(md) { ... }<br>@include media-breakpoint-down(lg) { ... }<br>@include media-breakpoint-down(xl) { ... }<br>@include media-breakpoint-down(xxl) { ... }</pre><pre>// Example: Style from medium breakpoint and down<br>@include media-breakpoint-down(md) {<br>  .custom-class {<br>    display: block;<br>  }<br>}</pre><p>Since browsers don’t support range context queries, Bootstrap works around the min- and max- prefixes, and viewports with fractional widths by using values with higher precision. These mixins above subtract .02px from the declared breakpoints and use them as the max-width values. For instance:</p><pre>// X-Small devices (portrait phones, less than 576px)<br>@media (max-width: 575.98px) { ... }</pre><pre>// Small devices (landscape phones, less than 768px)<br>@media (max-width: 767.98px) { ... }</pre><pre>// Medium devices (tablets, less than 992px)<br>@media (max-width: 991.98px) { ... }</pre><pre>// Large devices (desktops, less than 1200px)<br>@media (max-width: 1199.98px) { ... }</pre><pre>// X-Large devices (large desktops, less than 1400px)<br>@media (max-width: 1399.98px) { ... }</pre><pre>// XX-Large devices (larger desktops)<br>// No media query since the xxl breakpoint has no upper bound on its width</pre><h4>Configuring for Single Breakpoint</h4><p>If you need to target a single segment of screen sizes, you might want to use the predefined media queries and mixins by Bootstrap. Those are as follows:</p><pre>@include media-breakpoint-only(xs) { ... }<br>@include media-breakpoint-only(sm) { ... }<br>@include media-breakpoint-only(md) { ... }<br>@include media-breakpoint-only(lg) { ... }<br>@include media-breakpoint-only(xl) { ... }<br>@include media-breakpoint-only(xxl) { ... }</pre><p>And, for instance, if you use the <strong>@include media-breakpoint-only(md) { … },</strong> it will result in:</p><pre>@media (min-width: 768px) and (max-width: 991.98px) { ... }</pre><h4>Between Breakpoints</h4><p>Moreover, media queries may span multiple breakpoint widths, like:</p><pre>@include media-breakpoint-between(md, xl) { ... }</pre><p>Which then results in:</p><pre>// Example<br>// Apply styles starting from medium devices and up to extra large devices<br>@media (min-width: 768px) and (max-width: 1199.98px) { ... }</pre><h4>Pro Tip: customize and extend bootstrap to have more break points!</h4><p>You can use Sass variables and mixins to add custom and modified breakpoints according to your needs if you’re using the source codes of Bootstrap. As you know, variables and maps determine the number of columns, the width of gutters, and the media query points. You can use them to generate custom mixins as described below:</p><pre>// Creates a wrapper for a series of columns<br>@include make-row();</pre><pre>// Make the element grid-ready (applying everything but the width)<br>@include make-col-ready();</pre><pre>// Without optional size values, the mixin will create equal columns (similar to using .col)<br>@include make-col();<br>@include make-col($size, $columns: $grid-columns);</pre><pre>// Offset with margins<br>@include make-col-offset($size, $columns: $grid-columns);</pre><p>These mixins allow you to customize the predefined classes in your code and customize them according to your needs. The use case syntax looks as follows:</p><pre>.example-container {<br>  @include make-container();<br>  // Make sure to define this width after the mixin to override<br>  // `width: 100%` generated by `make-container()`<br>  width: 800px;<br>}</pre><pre>.example-row {<br>  @include make-row();<br>}</pre><pre>.example-content-main {<br>  @include make-col-ready();</pre><pre>  @include media-breakpoint-up(sm) {<br>    @include make-col(6);<br>  }<br>  @include media-breakpoint-up(lg) {<br>    @include make-col(8);<br>  }<br>}</pre><pre>.example-content-secondary {<br>  @include make-col-ready();</pre><pre>  @include media-breakpoint-up(sm) {<br>    @include make-col(6);<br>  }<br>  @include media-breakpoint-up(lg) {<br>    @include make-col(4);<br>  }<br>}</pre><p><strong><em>Implementing in Bootstrap:</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Frafia2411%2Fembed%2Fpreview%2FQWxxRxr%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DQWxxRxr&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Frafia2411%2Fpen%2FQWxxRxr&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FQWxxRxr-512.jpg%3Fversion%3D1669629071&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/14b8f31bd8e638783784b948a8e818f8/href">https://medium.com/media/14b8f31bd8e638783784b948a8e818f8/href</a></iframe><h3>Breakpoints in Tailwind CSS</h3><p>Breakpoints target the most common screen sizes most people stick to the default one and the creators of Tailwind CSS put a lot of thought into the default breakpoints. We’re trying to explain and exemplify ways of modifying the default ones.</p><p>It’s to remember that the order of the breakpoints is crucial, as the framework reads the breakpoint’s order to create necessary media queries. Because of the nature of CSS, the last breakpoint has more specificity than the first breakpoint.</p><p>Let’s see the ways of implementing breakpoints in Tailwind CSS:</p><h4>Configuring to Add a lower breakpoint</h4><pre>const defaultTheme = require(&quot;tailwindcss/defaultTheme&quot;);</pre><pre>module.exports = {<br>  theme: {<br>    screens: {<br>      xs: &quot;375px&quot;,<br>      ...defaultTheme.screens<br>    },<br> }<br>}</pre><p>To add an additional small breakpoint, you can use <strong><em>‘extend’</em></strong> as the small breakpoint would be added to the end of the breakpoint list, and breakpoints need to be sorted in ascending order to work as expected with a min-width breakpoint system.</p><h4>Configuring to Add A Bigger Breakpoint</h4><p><strong>In the extended section</strong></p><p>You can easily add an additional breakpoint with the <strong><em>‘extend’</em></strong> key if you need to, and the code will look like this:</p><pre>module.exports = {<br>  theme: {<br>    extend: {<br>      screens: {<br>        &#39;3xl&#39;: &#39;1600px&#39;,<br>      },<br>    },<br>  },<br>  plugins: [],<br>}</pre><p>This will enable you to add your custom screen to the end of the default breakpoint list.</p><p><strong>By overwriting the defaults</strong></p><p>You can override the entire<strong><em> ‘screens’</em></strong> by respecifying the default breakpoints:</p><pre>const defaultTheme = require(&#39;tailwindcss/defaultTheme&#39;)</pre><pre>module.exports = {<br>  theme: {<br>    screens: {<br>      &#39;xs&#39;: &#39;475px&#39;,<br>      ...defaultTheme.screens,<br>    },<br>  },<br>  plugins: [],<br>}</pre><p>The default theme is exposed at<strong> ‘tailwindcss/defaultTheme’ </strong>so that you don’t have to maintain the list of default breakpoints.</p><h4>Configuring Using Custom Screen Names</h4><p><strong>Max-width Breakpoints</strong></p><p>You can specify your screens as objects with a <strong><em>‘max’</em></strong> key to work with max-width breakpoints. The syntax should look like this:</p><pre>module.exports = {<br>  theme: {<br>    screens: {<br>      &#39;2xl&#39;: {&#39;max&#39;: &#39;1535px&#39;},<br>      // =&gt; @media (max-width: 1535px) { ... }</pre><pre>      &#39;xl&#39;: {&#39;max&#39;: &#39;1279px&#39;},<br>      // =&gt; @media (max-width: 1279px) { ... }</pre><pre>      &#39;lg&#39;: {&#39;max&#39;: &#39;1023px&#39;},<br>      // =&gt; @media (max-width: 1023px) { ... }</pre><pre>      &#39;md&#39;: {&#39;max&#39;: &#39;767px&#39;},<br>      // =&gt; @media (max-width: 767px) { ... }</pre><pre>      &#39;sm&#39;: {&#39;max&#39;: &#39;639px&#39;},<br>      // =&gt; @media (max-width: 639px) { ... }<br>    }<br>  }<br>}</pre><p>Remember to list max-width breakpoints in descending order for them to override each other as expected.</p><p><strong>Fixed-range breakpoints</strong></p><p>If you want to specify both a ‘min-width’ and ‘max-width’ in your breakpoints, you can use <strong><em>‘min’</em></strong> and <strong><em>‘max’</em></strong> keys together. The syntax will look like this:</p><pre>module.exports = {<br>  theme: {<br>    screens: {<br>      &#39;sm&#39;: {&#39;min&#39;: &#39;640px&#39;, &#39;max&#39;: &#39;767px&#39;},<br>      // =&gt; @media (min-width: 640px and max-width: 767px) { ... }</pre><pre>      &#39;md&#39;: {&#39;min&#39;: &#39;768px&#39;, &#39;max&#39;: &#39;1023px&#39;},<br>      // =&gt; @media (min-width: 768px and max-width: 1023px) { ... }</pre><pre>      &#39;lg&#39;: {&#39;min&#39;: &#39;1024px&#39;, &#39;max&#39;: &#39;1279px&#39;},<br>      // =&gt; @media (min-width: 1024px and max-width: 1279px) { ... }</pre><pre>      &#39;xl&#39;: {&#39;min&#39;: &#39;1280px&#39;, &#39;max&#39;: &#39;1535px&#39;},<br>      // =&gt; @media (min-width: 1280px and max-width: 1535px) { ... }</pre><pre>      &#39;2xl&#39;: {&#39;min&#39;: &#39;1536px&#39;},<br>      // =&gt; @media (min-width: 1536px) { ... }<br>    },<br>  }<br>}</pre><p>These irregular breakpoints will only be effective when the viewport size is explicitly within the defined range. The code will look like this:</p><pre>&lt;div class=&quot;md:text-center&quot;&gt;<br>  This text will be centered on medium screens, but revert back<br>  to the default (left-aligned) at all other screen sizes.<br>&lt;/div&gt;</pre><h4>Multi-range breakpoints</h4><p>You can also have a single breakpoint definition to apply in multiple ranges. For instance, if you want your breakpoints to base on the content area, rather than the entire viewport, you’ll be able to simulate that by having one of your breakpoints fall back to a smaller breakpoint when the sidebar becomes visible and shrinks to the content area.</p><p>A simple example is given below for a better understanding:</p><pre>module.exports = {<br>  theme: {<br>    screens: {<br>      &#39;sm&#39;: &#39;500px&#39;,<br>      &#39;md&#39;: [<br>        // Sidebar appears at 768px, so revert to `sm:` styles between 768px<br>        // and 868px, after which the main content area is wide enough again to<br>        // apply the `md:` styles.<br>        {&#39;min&#39;: &#39;668px&#39;, &#39;max&#39;: &#39;767px&#39;},<br>        {&#39;min&#39;: &#39;868px&#39;}<br>      ],<br>      &#39;lg&#39;: &#39;1100px&#39;,<br>      &#39;xl&#39;: &#39;1400px&#39;,<br>    }<br>  }<br>}</pre><h4>Custom media queries</h4><p>Moreover, if you want to have full granted control over the generated media query, you might want to use the <strong><em>‘raw’</em></strong> key. The syntax will be as follows:</p><pre>module.exports = {<br>  theme: {<br>    extend: {<br>      screens: {<br>        &#39;tall&#39;: { &#39;raw&#39;: &#39;(min-height: 800px)&#39; },<br>        // =&gt; @media (min-height: 800px) { ... }<br>      }<br>    }<br>  }<br>}</pre><p>The <strong><em>‘min’ </em></strong>and <strong><em>‘max’ </em></strong>keys will be ignored and the output will be as-is if the media queries are defined using the <strong><em>‘raw’ </em></strong>key.</p><p><strong><em>Implementing Breakpoints in Tailwind CSS</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Frafia2411%2Fembed%2Fpreview%2FeYKjOXa%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DeYKjOXa&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Frafia2411%2Fpen%2FeYKjOXa&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FeYKjOXa-512.jpg%3Fversion%3D1669715457&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/799c9e9cac66a5a71f592b68774160a1/href">https://medium.com/media/799c9e9cac66a5a71f592b68774160a1/href</a></iframe><h3>Breakpoints in Foundation</h3><p>Foundation has three core breakpoints for sites:</p><ul><li><strong>Small</strong>: any screen.</li><li><strong>Medium</strong>: any screen 640 pixels or larger.</li><li><strong>Large</strong>: any screen 1024 pixels or larger.</li></ul><p>You can modify the components at different screen sizes using special breakpoint classes, unlike Bootstrap or Tailwind CSS. See the code exemplified below:</p><pre>&lt;div class=&quot;grid-x grid-margin-x&quot;&gt;<br>  &lt;div class=&quot;cell small-6 medium-4&quot;&gt;&lt;/div&gt;<br>  &lt;div class=&quot;cell small-6 medium-8&quot;&gt;&lt;/div&gt;<br>&lt;/div&gt;</pre><p>In the above code, the left-hand column is six columns wide on small screens, hence <strong>.small-6</strong>. On medium-sized screens, the class <strong>.medium-4 </strong>overrides the small style, changing the column to be four wide.</p><p>If you’re using the CSS version, you can use the following media queries to imitate the core three:</p><pre>/* Small only */<br>@media screen and (max-width: 39.9375em) {}</pre><pre>/* Medium and up */<br>@media screen and (min-width: 40em) {}</pre><pre>/* Medium only */<br>@media screen and (min-width: 40em) and (max-width: 63.9375em) {}</pre><pre>/* Large and up */<br>@media screen and (min-width: 64em) {}</pre><pre>/* Large only */<br>@media screen and (min-width: 64em) and (max-width: 74.9375em) {}</pre><h4>Changing the Breakpoints</h4><p>You can change the default breakpoints if you’re using the Sass files. The names of the breakpoints and their widths are enlisted in the official doc as such:</p><pre>$breakpoints: (<br>  small: 0px,<br>  medium: 640px,<br>  large: 1024px,<br>  xlarge: 1200px,<br>  xxlarge: 1440px,<br>);</pre><p>These values are converted to ems at the end for use in media queries though they’re listed above in pixels. Also, there are two extra breakpoints (<strong>xlarge </strong>&amp; <strong>xxlarge</strong>) that are not used for any components and do not output any CSS classes that use them by default.</p><p>Remember to list the breakpoints in ascending order so that the keys like <strong><em>‘down’ </em></strong>in the breakpoint function will work as expected.</p><p>You can also change it by modifying the <strong>$breakpoint-classes </strong>variables in your settings file and any change in the list will change the CSS class output. It will look like this:</p><pre>$breakpoint-classes: (small medium large);</pre><p>To add <strong>xlarge </strong>class in your CSS, you can just add it to the end of the list as such:</p><pre>$breakpoint-classes: (small medium large xlarge);</pre><h4>Sass</h4><p><strong>The Breakpoint Mixin</strong></p><p>According to their official doc, you can use the named breakpoints, or custom pixel, rem, or em values. You’ll have to call it with <strong><em>@include </em></strong>and include the CSS content you want inside 2nd brackets. It should look as follows:</p><pre>.element {<br>  // Only affects medium screens and larger<br>  @include breakpoint(medium) {<br>    // All CSS in here goes inside the media query<br>  }<br>}</pre><p>After separating the breakpoint value by space, adding keywords can change the media query behavior.</p><pre>.element {<br>  // Only affects medium screens and smaller<br>  @include breakpoint(medium down) { }<br>  // Only affects medium screens, not small or large<br>  @include breakpoint(medium only) { }<br>}</pre><p>You can also pass in custom values of your choice since all values are converted to em at the end.</p><p>Check the example below:</p><pre>.element {<br>  // Converted to 20em<br>  @include breakpoint(320px) { }<br>  // Unitless values are assumed to be pixels<br>  @include breakpoint(320) { }<br>  // Converted to 40em<br>  @include breakpoint(40rem) { }<br>}</pre><p>Lastly, there are three special media, portrait, landscape, and retina that are not width-based. Doing so, you’ll get the output of a media query for device orientation or pixel density rather than the screen width. The configuration should be as follows:</p><pre>.element {<br>  @include breakpoint(landscape) {<br>    // CSS for landscape-oriented devices only<br>  }<br>  @include breakpoint(retina) {<br>    // CSS for high-resolution displays only<br>  }<br>}</pre><p><strong>Breakpoint Function</strong></p><p>The functionality of the<strong> breakpoint()</strong> mixin comes from an internal function similarly named <strong>breakpoint()</strong>. While writing your own media query, you can use this function to directly access the logic of the mixin. See the example below:</p><pre>@media screen and #{breakpoint(medium)} {<br>  // Medium and up styles<br>}</pre><p>You can use this to combine media queries together like:</p><pre>@media screen and #{breakpoint(medium)} and #{breakpoint(xlarge down)} {<br>  // Medium to extra large styles<br>}</pre><h4>JavaScript</h4><p><strong>Working with Media Queries</strong></p><p>Foundation doc includes a set of helpful functionalities in their JavaScript. You can find them all on the <strong>Foundation.MediaQuery</strong> object.</p><p>As the MediaQuery utility uses the Sass breakpoint settings and requires the Foundation CSS to be imported, you’d better remember to include either <strong>foundation-everything() </strong>or <strong>foundation-global-styles().</strong></p><p>You can get the name of the current breakpoint with<strong> MediaQuery.current.</strong></p><pre>Foundation.MediaQuery.current // =&gt; &#39;small&#39;, &#39;medium&#39;, etc.</pre><p>Also, you can use <strong>MediaQuery.is()</strong> to check where the breakpoint of the screen is at, such as:</p><pre>Foundation.MediaQuery.is(&#39;medium&#39;) // =&gt; True for &quot;medium&quot; or larger</pre><p>You can use modifiers like up(default), down, and only in Sass or use the equivalent <strong>MediaQuery.atLeast(), MediaQuery.only() and MediaQuery.upTo()</strong> like:</p><pre>// ↑ True for &quot;medium&quot; or larger (by default)<br>Foundation.MediaQuery.is(&#39;medium up&#39;);<br>Foundation.MediaQuery.atLeast(&#39;medium&#39;);</pre><pre>// → True for &quot;medium&quot; only<br>Foundation.MediaQuery.is(&#39;medium only&#39;);<br>Foundation.MediaQuery.only(&#39;medium&#39;);</pre><pre>// ↓ True for &quot;medium&quot; or smaller<br>Foundation.MediaQuery.is(&#39;medium down&#39;);<br>Foundation.MediaQuery.upTo(&#39;medium&#39;);</pre><p>If you need to get the media query breakpoint, use <strong>MediaQuery.get</strong> like this:</p><pre>Foundation.MediaQuery.get(&#39;medium&#39;) // =&gt; only screen and (min-width: 640px)</pre><p><strong><em>Implementing Breakpoints in Foundation</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcodepen.io%2Frafia2411%2Fembed%2Fpreview%2FmdKjbam%3Fdefault-tabs%3Dhtml%252Cresult%26height%3D600%26host%3Dhttps%253A%252F%252Fcodepen.io%26slug-hash%3DmdKjbam&amp;display_name=CodePen&amp;url=https%3A%2F%2Fcodepen.io%2Frafia2411%2Fpen%2FmdKjbam&amp;image=https%3A%2F%2Fshots.codepen.io%2Fusername%2Fpen%2FmdKjbam-512.jpg%3Fversion%3D1669629024&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=codepen" width="800" height="600" frameborder="0" scrolling="no"><a href="https://medium.com/media/386e704d7bf24a2d99b7460a246e28d8/href">https://medium.com/media/386e704d7bf24a2d99b7460a246e28d8/href</a></iframe><h3>Adding CSS Breakpoints: Useful Tips!</h3><p>You might want to consider the following approaches before deciding on the breakpoints you’re to apply in your design to create better output and responsiveness:</p><ul><li><strong>Using minified HTML, CSS, and JavaScript</strong> to optimize your code and reduce page load time (including deleting spaces, commas, and other redundant characters).</li><li><strong>Setting the priorities right by starting from smaller viewports</strong> is more complicated to design for bigger screens or viewports than it is to do it for smaller viewports.</li><li><strong>First addressing the mobile view while designing the output</strong> then tweaking it for the desktop view. Doing so, the block-level elements will automatically expand to 100% and most of the contents will be optimized for mobile view.</li><li><strong>You should prioritize the features based on the type &amp; form factor of the device.</strong></li></ul><p>Using media queries is a popular way to deliver a tailored style sheet into a website to set the conditions for the design to adapt to the size of the screen. Now that you are familiar with the implementation techniques of these breakpoints, hopefully, you’ll get into a better design approach. Though it’s ideal, it’s not always the best approach to do so. To create the best result, think about content at every size, and fix the littlest quirks there are with custom media queries; thus you’ll be investing in the future of your website and in the future of the web in general.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87f40e310890" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>