All language subtitles for 16. Using Tabs

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Now that we're completely familiar with how the tabs work in material UI let's start getting it set

up.

First we're going to come up to the top and we're going to import ar tabs from material dash UI slash

core slash tabs and then also import the tab from the same place except with tab at the end not tabs

and then we're going to come down here below our image.

So underneath the logo and we're going to open up our tabs component inside.

Let's go ahead and set up a tab with a label of Home Capital H and it's a self closing tag.

And then we're going to go ahead and copy this and paste this for each of our pages that we want to

have.

So I believe there are five in total.

So I need to add one two three four more and then we'll change these labels to services the Rev Mu Shun

about us and contact us.

Easy enough.

Let's go ahead and save this and see how far that gets us.

So go ahead and save and we'll see the app refresh.

And now you can see that we've got these tabs up in our toolbar.

They don't do anything yet.

If you click on them except give a little ripple up there so you can tell that they are buttons and

you get the little hover the click cursor showing up but you see we don't have the active tab there's

no managing of that.

They're all on the highlighted right now.

So none of them are highlighted and it doesn't change any of the content that we are seeing on the screen

nor does it change the path in the U.R.L..

So obviously we haven't set up any routing and so they are not actually changing the page that we're

on yet before we start getting into all of that though.

I want to actually set up the styling for our tabs so that we can make sure it looks how we want it.

And then we'll go in and start adding the functionality to start getting this to look how I want.

In the design the first step is to make all of these tabs actually aligned over to the right.

So we want them to be more pushed over to the side there.

So we'll do that by go ahead and adding a class name to our tabs and we'll set that to classes dot tab.

Container then we'll go up and we'll create that styles in our styles object of TAB container open that.

And now we want to set our margin left to order auto what this does is it sets the left margin so here

between the tabs and the image.

This left most margin here by sending it to auto.

It's going to extend as much as it can and push all of these tabs down over to the right side.

If we go ahead and save our file we can see the app refresh and you can now see the tabs have done exactly

that.

The next style that I want to do is to actually change the font used in the header tabs and to do that.

I've actually attached a link to this video.

And if you go ahead and copy that link we're then going to head into our index.

Dot h t email file.

And here where we are linking to the Google fonts for Roberto right in front of Roberto.

So where it says CSX.

Question mark family and then an equal sign after the equal sign.

But before Roberto we're gonna go ahead and paste in that link and so you can see that that's Pacifica.

And then a bar or a pipe depending on what you call that and then the railway font with the 100 400

400 italics and 700 variants.

So make sure you have all of those correct as well as the bar or pipe before rubato and then go ahead

and save that file with our Google fonts hooked up we can exit out of the index Deitch html file and

head back to our header dot J.S. s and here we're gonna go down and set a class name on our individual

tab and so we're going to call this class's dot tab then we're gonna go ahead and actually copy that

and we're going to paste that class onto all of our tabs down here.

Now we can go ahead and style our tabs by adding the tab style to our styles object and we'll start

by setting the font family to railway which is one of the fonts that we just installed.

You can go ahead and save that.

See our application refresh and the new font is now in use.

You can see that the tabs are actually in all uppercase and that is due to a styling from the button

component which is actually being used underneath the tab component here in material UI.

And so to disable that we're going to go ahead and give it a text transform of none.

And that will disable the upper casing.

And so if you go ahead and save that you now see that we have our default text styling.

Now I actually want our font to be bold so let's go ahead and add a font weight font weight of seven

hundred to this and a 700 because that is one of the font weights that we specified when we just imported

railway from Google fonts.

So if we go ahead and save this we can now see a much more bolder font choice the font weight looks

really good now but it's definitely still too small.

So let's go ahead and add a font size of one rim.

And that's the responsive unit the material UI uses throughout their theme and is connected to the base

font size.

The material UI provides to us of 14 points if we go ahead and save that you'll see the font size increase

and that looks about where I want to be by using rim instead of pixels we make sure that that font is

going to be relatively the same.

Looking size across all different screen sizes.

Whereas using the pixel unit could cause screens of differing screen resolutions to display the text

a differently.

We definitely want to make our design as consistent as we can across all devices.

And so that's why we're going to be using the rim unit.

This is getting really close to the look that I have in the design but I still want to go ahead and

change the spacing between the tabs because I think that that's still a little bit too large.

Let's go ahead and add a mean width then of just 10.

If we save that we can see the that then squeezes all of our tabs together and makes their width equal

more equal to just the width of the text within it.

We don't want each tab to have a ton of extra spacing in it.

So we just want it to really be around that text.

So that's why we have these small men width but they are a little bit too close together then.

So what's at a margin left to each one of 25 pixels.

Now the reason that we would use pixels here is because we want to maintain a constant spacing between

those tabs regardless of if the browser is on a 27 inch iMac or a 13 inch MacBook if we used a responsive

unit here then that spacing would be relative and different for each screen size which isn't exactly

the look that I want for the tabs.

And so we're going to create a little more consistency using the pixels unit here.

Generally we'll be using the pixels unit for certain specific spacing sizes whereas four sizes of elements

themselves or the text.

That is when we'll be using responsive units so let's go ahead and save this with our margin left and

you can now see that those tabs are just a little bit more spaced out.

And I think that that is exactly where I wanted them.

Now if you want to flip back to the design file and see what the header looks like in there I'm pretty

sure you'll find that we have almost exactly nailed it down the look that I was going for although we

obviously still need the estimate button and then the way to keep track of which tab is active we'll

keep moving forward with that in the next few videos.

But for the very last part of this one I just want to do a little bit of cleanup that will help make

our project a little more efficient in the future.

So what we're going to do is we're actually going to take this font size font weight text transform

and font family properties and we're going to cut those away.

So leave the men width and the margin left on the tab.

And now let's go over to our theme dot J.S. file and where we had our H 3 typography variant just so

that I could show you how the typography system works let's get rid of that and replace it with a tab

option and open that up here you're seeing the first example of how we can set our own custom variants

for the theme object which allows us to really centralize styles that we know we're going to be using

elsewhere in the application so here we're going to paste those styles that we had just come over from

our tabs.

And so if we save that and then flip it back over to our header file now in our tab since we have access

to the theme right there we can simply extend the tab typography theme using the spread operator.

So just like we did for the theme dot mix ins dot toolbar right there we will extend theme dot typography

dot tab and then make sure you get the comma there at the end.

And if we go ahead and his save now you'll notice the page reloads and we still have all these styling

for our tabs except now we've done a little bit better of a job by centralizing them in our theme in

case we need to use them later on with this setup though our header is really looking good and now we've

got some styled tabs looking exactly how we wanted it and so now the next step is putting in that estimate

button and taking a look at the different options for buttons in material UI.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.