Material UI is a design language developed by Google in 2014 that features react components. There are lot of UI components available to fulfill the business needs. Also, the customizable components of the material UI can be easily modified as per our requirements. It is a library that allows us to import and use different components to create a user interface in our react applications. This saves a significant amount of time since the developers do not have to write everything from the scratch.
Material UI is the most powerful and efficient tool to build an application by adding designs and animations with technical and scientific innovation. It uses JavaScript frameworks and libraries like AngularJS and ReactJS to make the application more amazing and responsive. Also, enables the users to add design, animations, grid-system, shadows, and lightning effects, which allows for faster and easier stylized web development.
Material Design is a key approach to Android platform for both UI and UX. Its original purpose was for designing apps for both desktops and mobile platforms.
It’s created to bring user experience and provides optional CSS Baselines components. It has many default themes so; we can easily customize the themes and, we can customize the components.
To avoid making terrible user interfaces, material design shows UX designers a clear path regarding how to design animations, styles, layouts, components, and patterns. This is done so that anyone interacting with any of the Google products and services has a unified and pleasurable user experience.
Material UI supports the latest, stable releases of all major browsers and platforms. It also supports Internet Explorer 11.
Material UI provides low-level utility functions called “style functions” for building powerful design systems.
Material UI provides low-level utility functions called “style functions” for building powerful design systems.
These are the other prerequisites required:
To install Material UI, run the below command in your working directory.
Install Material UI by using npm
npm install @material-ui/core
Install Material UI by using yarn
yarn add @material-ui/core
To use Material-UI components, we first need to import them into our project. This is done, as shown below.
Detailed Example using react:
In this example we will import button.
color=”primary” : We have some default color like primary and secondary color .
size=”small” : We can define the size of the button like small, medium, large.
Material UI is developed mobile-first, a strategy in which we can first write code for mobile devices. To ensure proper rendering and touch zooming for all devices, add the responsive viewport meta tag to your <head> element.
<meta name=”viewport” content=”minimum-scale=1, initial-scale=1, width=device-width”/>
We can add CSS media queries, if necessary.
This is a CSS media query hook for React. It listens for matches to a CSS media query. It allows the rendering of components based on whether the query matches or not.
You can customize the values of this breakpoint in the theme. A breakpoint is the range of predetermined screen sizes that have specific layout requirements. The functions you asked about (up, down, between) are helpers for creating media queries using the breakpoints defined in the theme.
CSS media queries are the idiomatic approach to make your UI responsive. The theme provides four style helpers to do so:
Which matches screen widths greater than and including the screen size given by the breakpoint key.
key (String | Number): A breakpoint key (xs, sm, etc.) or a screen width number in pixels.
Example:
Which matches screen widths less than and including the screen size given by the breakpoint key.
key (String | Number): A breakpoint key (xs, sm, etc.) or a screen width number in pixels.
Which matches screen widths including the screen size given by the breakpoint key.
key (String): A breakpoint key (xs, sm, etc.).
Which matches screen widths greater than the screen size given by the breakpoint key in the first argument and less than the screen size given by the breakpoint key in the second argument.
start (String): A breakpoint key (xs, sm, etc.) or a screen width number in pixels.
end (String): A breakpoint key (xs, sm, etc.) or a screen width number in pixels.
Responsive layouts in material design adapt to any possible screen size, the UI guidelines include flexible grid that ensures consistency across layouts, breakpoint details about how content reflows on different screens, and a description of how an app can scale from small to extra-large screens.
Meet Geethika Naga Lakshmi Lolugu, a Software Engineer at Acuvate. She has over 3+ years of industry experience in User interface & User experience design and development. This techie is very much focused to secure a challenging role in Web development/ Front end developer and contributing her efforts to reach the company goals. She has also worked on various projects including Unilever, bcpc, bcw(brand collaboration workspace) and now, she is part of Mesh 3.0.
Geethika Naga Lakshmi Lolugu