Auto-generated transcript Alright, we're going to continue designing the landing page for this travel agency. Last time we built this hero section, which it looks amazing. This time we're going to design the benefits section. This is just the features or the benefits that our product provides. And this is what it looks like. You can see we have a little badge at the top that tells us the section title. We have a headline, we have four benefits, each with their own unique icon. and finally we have a stock image at the center. Now first things first, I'm going to go into VS Code and create a benefits component. There we go and now I'm going to render this on our page right here. Now let's see. And there we go, we can see it being rendered here. Now next let's rename this to a section and add some padding and put all of this inside a container. First let's create the heading badge. So for that we're going to use this plane icon I found on compose icons. We're going to add this to our icons.tsx file just like all the icons. And of course don't forget to add a label for screen readers. Plain icon. Now let's go create the heading label. Just follow exactly as I do here. We're going to need a flexbox. Now I'll add some gap as well just to make things look nicer. Make sure to make this element relative because we're going to use that to position the plane icon properly. And there we go, you can see it being rendered here. create an absolutely positioned element with these classes. This is going to contain our plane icon. We're going to use a shade of slate 800 because pure black just doesn't look good on the web. We're going to render the plane icon here and just rotate this 225 degrees. positive to 20 to 25 degrees and there we go we can see that being rendered here now next let create the headline we give it a size of text 4XL and we make it bold Also the buddy in travel buddy we going to give it a color of orange 600 and this apostrophe please make sure to escape it as well or your code editor will just call you names and there we go we have our headline now this little label above we're going to be reusing this a lot in other sections as well so I'm just going to put this in its own component I'm just going to take all of this cut it and make it its own component we'll call it heading label because I'm actually that bad at naming things. I'll just paste all of this here. And import icons. And this is just going to take a single prop, which is text. Now let's go back to our benefits component use this add the text prop and then let's see and you can see it works perfectly now next let's add the stock image and I've already selected this here let's add this to our project we'll create another div and give it some margin top we'll add the image and we'll make it a bit rounded now currently it looks huge and we're going to fix that in a bit. We'll fix this in a bit. But first let's create the four components that we have, four benefits that we have. We'll create a benefit component and we'll give it a couple props icon, header, and text. I'm going to create an interface here, benefit props, just so types actually has the proper types here. Now let's create the actual JSExport as component. This is going to be very basic for now because I just want to render the actual benefits and then worry about styling them later. Let create a div here and render a benefit Actually first let create a list of benefits up here We just call them benefits and we add all the properties that they have right here Now I just going to keep the icons as undefined for now and we'll add everything else here. Best price guarantees for the text I'm just going to use lipsum let's say 15 words of lipsum and of course wrap this in quotes now let's copy this and just paste it four times hassle-free booking 24 7 customer support and then just one more to go exclusive travel deals. And now let's actually render all of these. And we can just use the map function to do that. Benefit. And make sure to add a key because we're rendering a list here. And then I'll just use the spread syntax to render the whole benefit here. And this is what we have so far. This is really basic. Next, let's find icons. And this just takes such a long time, so I'm just going to speed this up a bit. all of these will be available in the github in the source code and by the way all of these icons are from flat icon dot com. Now let's add these icons one by one to all of our benefits. if you use any different icons just make sure that you have the file name and the file path properly set here okay there we go and they not showing up we need to fix that Okay instead of rendering the actual just text here we need to make this an image And pass the icon in the source Now we should see it. And there we go, we have our icons. Now let's improve this a bit more. I'm going to give it a width of 12. So just make it a bit smaller. and I'm going to give them a margin bottom. I'm going to do the same thing for the header. There we go, that looks a bit nicer. Next let's try arranging these in a grid, and that already looks a lot better, but But we need to centralize the image inside them. So we're just going to create two groups of benefits, benefits G1 and G2. I'm going to move these two benefits, these last two benefits into benefits G2. And then we're going to render both of these groups separately. First G1, then I'll render the image. And then I'll render benefits G2. The same way we rendered the first group. There we go. And this is what we have now. We're almost done with this. Let's change this grid to have three columns instead of two. And now we have this. Now, finally, we just need to move these benefits into their own div. This one as well. And now we're almost done here. You can see we have almost the same layout as what I showed you in the beginning. Let's turn this into a flex column and add some gap. Just to separate both benefits. Let's make this gap 16. That looks good. Now let's do the same thing for benefits G2. There we go. Let's also add some horizontal gap in this whole group here. That's a bit better. Let's also add some more margin top to separate this whole group. And let's increase our horizontal gap a bit more, make it 16. And that looks great. And that is all we really need to do to design this benefits section. This is what we wanted to build. And that's all for this section. Yeah, that's all for this section.