Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,110 --> 00:00:11,080
I'm here at the material UI documentation page under components layout and then hidden if this is one
2
00:00:11,080 --> 00:00:20,530
of the components provided to us by material UI to help with responsive design the hidden component
3
00:00:20,740 --> 00:00:27,700
works with the breakpoints system that we're already familiar with to either show or hide different
4
00:00:27,700 --> 00:00:35,960
content this works extremely well with the grid component and is commonly used to change layouts or
5
00:00:35,960 --> 00:00:43,910
functionality based on the different device so if we scroll down here we can see an example of this.
6
00:00:43,960 --> 00:00:52,480
And if we open it up we'll see if they import a hidden component and all they do is simply wrap whatever
7
00:00:52,480 --> 00:00:59,500
components that they would like to be hidden or shown with the hidden components and then specify on
8
00:00:59,500 --> 00:01:05,950
our hidden component a prop that determines the breakpoints that you want your component to be visible
9
00:01:05,950 --> 00:01:06,940
at.
10
00:01:06,970 --> 00:01:11,550
You can see here that they use the extra small and up prop..
11
00:01:11,590 --> 00:01:16,420
So for any screen that is extra small or above which is all of them.
12
00:01:16,420 --> 00:01:24,010
This paper will be displayed you can see there were only have the one being displayed currently.
13
00:01:24,090 --> 00:01:31,980
And if we go and we begin to scroll the page down then we'll see more of them start popping up as we
14
00:01:31,980 --> 00:01:34,570
start entering the other breakpoints.
15
00:01:34,590 --> 00:01:39,690
And so you can see that they're being currently hidden but as we answer their breakpoints they begin
16
00:01:39,690 --> 00:01:40,430
to show up.
17
00:01:40,440 --> 00:01:42,370
And now we can see all of them.
18
00:01:42,930 --> 00:01:50,100
So it honestly is a pretty simple component that enables us to do some pretty nice and convenient things
19
00:01:50,340 --> 00:01:56,230
while using the media query and Breakpoint system that we're already familiar with.
20
00:01:56,250 --> 00:02:02,730
Let's go ahead and jump into our project directory so that we can see how this would actually work for
21
00:02:02,730 --> 00:02:03,540
us.
22
00:02:03,540 --> 00:02:08,480
So let's go ahead on size this down to here.
23
00:02:08,670 --> 00:02:15,840
And if we flip over to our development server page let's now go and take this screen down even smaller
24
00:02:16,080 --> 00:02:22,860
to where we get down to our drawers and then even to the very smallest size and you can see now they
25
00:02:22,860 --> 00:02:25,810
are foot or tabs are all totally messed up.
26
00:02:25,830 --> 00:02:27,570
They're being cut off.
27
00:02:27,570 --> 00:02:33,510
A lot of them aren't being displayed and honestly I just don't think that it looks very good right there
28
00:02:33,570 --> 00:02:37,050
or that that's really what you'd expect for a mobile site.
29
00:02:37,050 --> 00:02:42,570
I think for a lot of mobile sites they really don't include all of the links right there or if they
30
00:02:42,570 --> 00:02:48,630
do they kind of hide them away or put them in a different style but I'd really like to just get rid
31
00:02:48,630 --> 00:02:55,260
of them entirely because on a mobile site I think that you'd be much more familiar with just using the
32
00:02:55,260 --> 00:03:01,380
menu button and the draw for your navigation than you would be necessarily looking for links in the
33
00:03:01,380 --> 00:03:02,200
footer.
34
00:03:02,220 --> 00:03:05,250
I think that that's maybe something you would do more on a desktop.
35
00:03:05,580 --> 00:03:12,340
And so we're going to use the hidden component to implement this functionality if we come up in our
36
00:03:12,340 --> 00:03:16,820
footer dot J.S. file all the way to the top underneath our grid.
37
00:03:16,840 --> 00:03:18,080
Important Statement.
38
00:03:18,130 --> 00:03:28,320
Let's go ahead and import the hidden component from app material dash UI slash core slash hidden.
39
00:03:28,490 --> 00:03:34,570
And now we're going to come down and really simply underneath our footer above the grid.
40
00:03:34,700 --> 00:03:40,150
Let's wrap the entire grid with a hidden component.
41
00:03:40,150 --> 00:03:46,990
So we'll get rid of the closing tag and let's just go all the way to the bottom all the way to the bottom
42
00:03:47,020 --> 00:03:48,790
above our image.
43
00:03:48,790 --> 00:03:54,080
But underneath that last grid tag and let's close up our hidden components.
44
00:03:55,000 --> 00:04:01,540
So now we've got our entire grid link system here wrapped with the hidden component.
45
00:04:01,540 --> 00:04:07,510
And let's add a prop to this hidden component of MDI down.
46
00:04:07,510 --> 00:04:15,670
So that means that all the content inside is going to be hidden at the medium and below breakpoints
47
00:04:16,120 --> 00:04:22,060
the medium breakpoint is when we begin showing our draw instead of the tabs which is also an appropriate
48
00:04:22,060 --> 00:04:24,460
place to get rid of our footer links.
49
00:04:24,460 --> 00:04:31,390
So if we go ahead and save this now we'll see the page refresh and our footer links are gone.
50
00:04:31,450 --> 00:04:37,900
So if we bring the page back up to size we'll see all the sudden our footer links are restored and you
51
00:04:37,900 --> 00:04:43,780
can see they look great and centered as we size all the way up to full screen and we can come back down
52
00:04:43,780 --> 00:04:48,340
to see them continue to resize until they disappear entirely.
53
00:04:48,400 --> 00:04:54,100
And I think that gives us a really really clean mobile look that doesn't feel cluttered like it would
54
00:04:54,100 --> 00:04:55,690
otherwise.
55
00:04:55,750 --> 00:05:02,290
The hidden component is a pretty simple but really convenient and powerful piece of functionality that
56
00:05:02,290 --> 00:05:09,670
the material UI team has added For us that I think make it really easy to flexibly and dynamically render
57
00:05:09,850 --> 00:05:12,640
different content especially with the grid.
58
00:05:13,180 --> 00:05:16,660
But I don't want to weave our photo completely blank.
59
00:05:16,720 --> 00:05:20,820
I'm still actually going to want something in there for our mobile footer.
60
00:05:20,860 --> 00:05:27,760
So let's go ahead and start adding our social media icons are links to the Twitter Instagram and Facebook
61
00:05:28,120 --> 00:05:29,550
in the next video.
6883
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.