Implementing Responsive web design with Angular Material UI is very easy. It is having predefined directives for different views (mobile, tablet, desktop). You need to understand them and use them in proper way.

Directives for showing elements

Observe the below table. These directives implements "display:block" CSS property based on width of device

show-smShows element on devices less than 600px wide.
show-gt-smShows element on devices greater than 600px wide.
show-mdShows element on devices between 600px and 960px wide.
show-gt-mdShows element on devices greater than 960px wide.
show-lgShows element on devices between 960px and 1200px wide.
show-gt-lgShows element on devices greater than 1200px wide.

Directives for hiding elements

Observe the below table. These directives implements "display:none" CSS property based on width of device.
hide-smhide element on devices less than 600px wide.
hide-gt-smhide element on devices greater than 600px wide.
hide-mdhide element on devices between 600px and 960px wide.
hide-gt-mdhide element on devices greater than 960px wide.
hide-lghide element on devices between 960px and 1200px wide.
hide-gt-lghide element on devices greater than 1200px wide.

Directives for setting width of elements

Observe the below table. These directives implements "width: %" CSS property based on width of device.The value must be 33,66,99 or multiples of 5 (5, 15, 30, 50...)
flexwidth percentage of element
flex-smwidth percentage of element on devices less than 600px wide.
flex-gt-smwidth percentage of element on devices greater than 600px wide.
flex-mdwidth percentage of element on devices between 600px and 960px wide.
flex-gt-mdwidth percentage of element on devices greater than 960px wide.
flex-lgwidth percentage of element on devices between 960px and 1200px wide.
flex-gt-lgwidth percentage of element on devices greater than 1200px wide.

Views 

Desktop

Here we have to hide mobile and tablet views and show the desktop view
hide-md hide-sm show-gt-md

Tablet

Here we have to hide desktop and mobile views and show the tablet view 
hide-gt-md hide-sm show-md

Mobile 

Here we have to hide desktop and tablet views and show the mobile view
hide-gt-sm show-sm

Example 1: Create Responsive Header

Observe below diagram. Desktop and Tablet and Mobile are having different views. Lets implement this with above directives.

HTML Code 

Observe below highlighted code. 

<md-toolbar>
      <div class="md-toolbar-tools" ng-hide="showSearchBarDiv">
        <md-button class="md-icon-button" aria-label="Icon">
          <md-tooltip>Icon</md-tooltip>
          <md-icon class="md-default-theme" md-svg-icon="fb.svg"></md-icon>
        </md-button>
        <h2>
          <span>Heading</span>
        </h2>
        <md-input-container md-no-float class="md-accent" flex="50" style="padding-bottom:0px;margin-left:25px" show-gt-md hide-sm hide-md>
           <md-icon style="color:wheat" class="material-icons">&#xE8B6;</md-icon>
           <input ng-model="searchInput" placeholder="Search here" style="color:wheat;padding-left:25px;margin-left:5px">
        </md-input-container>
        <span flex></span>
        <md-button class="md-icon-button" hide-gt-md show-sm show-md ng-click="showSearchBarDiv = true">
          <md-tooltip>Search</md-tooltip>
          <img src="search.png" style="width:24px;height:24px;"/>
        </md-button>
        <md-button class="md-icon-button" show-gt-sm hide-sm>
          <md-tooltip>Pen</md-tooltip>
          <img src="pen.png" style="width:24px;height:24px;"/>
        </md-button>
        <md-button class="md-icon-button" show-gt-sm hide-sm>
          <md-tooltip>Messages</md-tooltip>
          <img src="messages.png" style="width:24px;height:24px;"/>
        </md-button>
        <md-button class="md-icon-button" show-gt-sm hide-sm>
          <md-tooltip>User</md-tooltip>
          <img src="user.png" style="width:24px;height:24px;"/>
        </md-button>
        <md-button class="md-icon-button" show-gt-sm hide-sm>
          <md-tooltip>Settings</md-tooltip>
          <img src="settings.png" style="width:24px;height:24px;"/>
        </md-button>
        <md-button class="md-icon-button" hide-gt-sm show-sm>
          <md-tooltip>Menu</md-tooltip>
          <img src="menu.png" style="width:24px;height:24px;"/>
        </md-button>
      </div>
      <div layout="row" class="md-toolbar-tools" show-sm show-md hide-gt-md ng-show="showSearchBarDiv">
        <md-button class="md-icon-button" ng-click="showSearchBarDiv = false">
          <img src="back.png" style="width:24px;height:24px;"/>
        </md-button>
        <md-input-container flex="80" md-no-float class="md-accent" style="padding-bottom:0px;">
           <md-icon style="color:wheat" class="material-icons">&#xE8B6;</md-icon>
           <input ng-model="searchInput" placeholder="Search here" style="color:wheat;padding-left:25px;margin-left:5px">
        </md-input-container>
        <span flex></span>
        <md-button class="md-icon-button">
          <img src="search.png" style="width:24px;height:24px;"/>
        </md-button>
      </div>
</md-toolbar>

Example 2: Create Responsive Body

 Observe below diagram. There are 3 panels (Left side, news feed, right side). In desktop view, all 3 panels are visible. In tablet view, only left panel and news feed are visible. In mobile view, Only news feed is visible.

HTML Code

Observe below highlighted code. Here we are also using flex directive. Flex value specified based on the view
<div layout="row">
       <div class="panel" flex="20" flex-md="30" show-gt-sm hide-sm>Left Side Panel</div>
       <div class="panel" flex="60" flex-sm="100" flex-md="70">News Feed</div>
       <div class="panel" flex="20" show-gt-md hide-sm hide-md>Right Side Panel</div>
</div>

67 comments:

  1. this is very helpful. thank you.

    ReplyDelete
  2. Great article. Glad to find your blog. Thanks for sharing.

    web design training in chennai

    ReplyDelete
  3. The type of clients you agree upon to work with speaks a lot about you and your web design firm. Similarly, the grounds on which they delegated the responsibility on you to produce a design speaks a lot about them. creatives

    ReplyDelete
  4. Thanks for sharing with us.. It may useful for all
    Laptop Service in Chennai

    ReplyDelete
  5. At the point when a site is propelled, it showcases the brand character of the business. Taking a gander at a site, the viewers have finish thought regarding the business and its work forms.Web Design Victoria

    ReplyDelete
  6. Responsive web design is the answer to the varying sizes of monitors, tablets, and mobile phones. With so many screen sizes today, it's so hard to keep track and it's also very impractical to create a separate set of codes for each to ensure "proper viewing" of websites. responsive web design

    ReplyDelete
  7. Because the width and layout structure of normal design could not accept the mobile screen size. www.exza.my

    ReplyDelete
  8. With such a variety of screen sizes today, it's so difficult to follow along and it's likewise exceptionally illogical to make a different arrangement of codes for each to guarantee "legitimate review" of websites.Web Design Athens

    ReplyDelete
  9. These directives implements "display:none" CSS property based on width of device.web design tutorials

    ReplyDelete
  10. I want to hide some div if width in less then 1080 other wise show that div. How can i achieve this. Please suggest.

    ReplyDelete
  11. Never thought that, that think we can do to angular.js.

    Thanks bro.

    It will definality work well to design my Extra Catchy website

    ReplyDelete
  12. Hi,
    Nice info! Well explained concept and I will definitely try this. Thanks for sharing. If anyone is looking for website development services I suggest Dotz Web, one of the best web development company.

    ReplyDelete
  13. Very rare to find such a marvelous blog, I feel lucky reading this.
    wordpress website

    ReplyDelete
  14. waooo really...this is a great information... i have read very carefully ... Very nice Blog.. thanks to share valuable post
    Web Designing Company India

    ReplyDelete
  15. Good Information... Really Like it. Great Information for Designers...Thanks to share it.
    Kids Party Planner Delhi NCR

    ReplyDelete
  16. This is very good information to now days the web design is more powerful one in the business. Web Development Company in Chennai

    ReplyDelete
  17. Thank you very much for sharing your findings. I believe this research will be much helpful in coming up with different things.
    Best Digital Marketing Agency in Texas USA
    Best PPC Services in Chicago, USA
    Graphics Design Company in Chicago

    ReplyDelete
  18. In the early brilliant years of versatile web design, there were various reasons why specialists believed that web applications ought to dependably be designed first for use on a cell phone. internet marketing

    ReplyDelete
  19. this is very helpful. thank you.

    ReplyDelete
  20. Just start out by learning how to create a basic web page and use the basic tags needed to create one. Then once you input the basic code into Notepad, just save the file with an HTML file extension. ldainteractive

    ReplyDelete
  21. This will help you get an improved feel for the style of sites any particular web designer is capable of doing. Local SEO

    ReplyDelete
  22. Hence the reason why there are so many website design companies springing up, what these companies don't or can't do is the most important thing to do with a website and that is SEO, the problem is that it takes a very long time to do it right. creative web design

    ReplyDelete

  23. This is genuinely an awesome read for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!
    Web Development

    ReplyDelete
  24. Furthermore, there are progressively if's that the web design industry does not discuss.https://edkentmedia.com/toronto-website-design-development/

    ReplyDelete
  25. Web development services are one of the most important services now-a-days. Your webpage is really great in this regard. web development services

    ReplyDelete
  26. Such a great blog and all the writings. Can’t help thinking about the author.
    software development company in delhi

    ReplyDelete
  27. چسب وكيوم يا چسب ممبران
    چسب پي وي سي وكيوم چيست
    چسب ممبران نوعي ماده پليمري است كه براي روكش كردن سطوح ام دي اف با پي وي سي استفاده مي شود و حاصل فرمول پيچيده اي است. و پايه آن آب مي باشد.و در 2 مدل چسب وكيوم 2 جزعي و چسب وكيوم تك جزعي اراعه مي شود وهمان طور كه از اسم آن معلوم است چسب ممبران تك جزعي نياز به افزودن ماده ديگري ندارد
    چسب ممبران

    ReplyDelete
  28. This is very useful, although it will be important to help simply click that web page link:
    mason soiza

    ReplyDelete
  29. Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
    Thanks & Regards,
    VRIT Professionals,
    Web Designing Training Institute in Chennai.

    ReplyDelete
  30. Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.
    Website Designing Company in Delhi

    ReplyDelete
  31. visit our adobe muse template created on the basis of Adobe Muse CC 2017, which are easy to edit and customize.

    ReplyDelete
  32. This includes lots of whitespace, large type,use of a grid and clear hierarchy of elements. The layouts of these websites often resemble those of print magazines or posters, with striking headlines, multi-column text, highlighted quotations, indented text, supporting imagery, side notes and footnotes.web design company Toronto

    ReplyDelete
  33. Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet! Click here

    ReplyDelete
  34. The web webpage and long range interpersonal communication pages should supplement each other. Webdesign

    ReplyDelete
  35. You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us to read this... Webdesign

    ReplyDelete
  36. Webdesign. Sterke groeiambities en hoge ROI verwachtingen? Webdesign bureau Sempris lanceert uw bedrijf digitaal met professioneel en betaalbaar webdesign..Webdesign

    ReplyDelete
  37. Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though. Webdesign

    ReplyDelete
  38. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.. Webdesign

    ReplyDelete
  39. Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share. Webdesign

    ReplyDelete
  40. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.. Webdesign

    ReplyDelete
  41. It is perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it! Webdesign

    ReplyDelete
  42. This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post. I will visit your blog regularly for Some latest post. Webdesign

    ReplyDelete
  43. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Webdesign

    ReplyDelete
  44. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.. Webdesign

    ReplyDelete
  45. Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon! Webdesign

    ReplyDelete
  46. Webdesigner waar u een professionele en betaalbare website kan laten maken? De nr. 1 webdesigner in Limburg, Antwerpen en Vlaams-Brabant voor SEO websites. Webdesigner

    ReplyDelete
  47. Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon! Webdesign

    ReplyDelete
  48. Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon! Webdesign

    ReplyDelete
  49. Webdesigner waar u een professionele en betaalbare website kan laten maken? De nr. 1 webdesigner in Limburg, Antwerpen en Vlaams-Brabant voor SEO websites. Webdesigner

    ReplyDelete
  50. Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. Webdesign

    ReplyDelete
  51. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. Webdesign

    ReplyDelete
  52. Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. Webdesign

    ReplyDelete
  53. This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. Webdesign

    ReplyDelete
  54. Enjoyed studying this, very good stuff, thanks.
    โปรโมชั่นGclub ของทางทีมงานตอนนี้แจกฟรีโบนัส 50%
    เพียงแค่คุณสมัคร Gclub กับทางทีมงานของเราเพียงเท่านั้น
    ร่วมมาเป็นส่วนหนึ่งกับเว็บไซต์คาสิโนออนไลน์ของเราได้เลยค่ะ
    สมัครสล็อตออนไลน์ >>> goldenslot
    สนใจร่วมลงทุนกับเรา สมัครเอเย่น Gclub คลิ๊กได้เลย

    ReplyDelete
  55. Here is a good Weblog You might Come across Fascinating that we Encourage You

    เว็บไซต์คาสิโนออนไลน์ที่ได้คุณภาพอับดับ 1 ของประเทศ
    เป็นเว็บไซต์การพนันออนไลน์ที่มีคนมา สมัคร Gclub Royal1688
    และยังมีหวยให้คุณได้เล่น สมัครหวยออนไลน์ ได้เลย
    สมัครสมาชิกที่นี่ >>> Gclub Royal1688
    ร่วมลงทุนสมัครเอเย่นคาสิโนกับทีมงานของเราได้เลย

    ReplyDelete
  56. An intriguing discussion is worth comment. I’m sure that you simply write regarding this topic, may possibly not be considered a taboo subject but typically persons are too little to communicate on such topics. To another. Cheers wordpress

    ReplyDelete
  57. I would ensure the site looked proficient obviously, I trust that having quality photography and a perfect structure are the two most ideal approaches to get an expert site. Webdesign

    ReplyDelete
  58. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Webdesign bureau

    ReplyDelete
  59. As you can envision,seo services in gurgaon there is a whole other world to website composition than simply transferring a couple of pictures and gluing some content into a format.

    ReplyDelete
  60. IT enlistment offices assume a significant job in helping associations click here to employ experts who can give these arrangements as per the necessity.

    ReplyDelete

Blogroll

Follow this blog by Email

Popular Posts