DEV Community

Cover image for CSS Layout: A collection of popular layouts and patterns made with CSS
Phuoc Nguyen
Phuoc Nguyen

Posted on

CSS Layout: A collection of popular layouts and patterns made with CSS

Being a front-end engineer, I have to deal with a lot of layouts and components.

There are a lot of CSS frameworks out there that provide popular layouts and components but I usually don't want to include entire framework in my project because

  • It's giant and there are a lot of stuffs I don't need
  • Each layout or component provides a lot of unnecessary options because it serves many functionalities, for many people

For each project with different requirements, I often google for the most basic part of particular layout or UI pattern and build up from there.

So I collect most popular layouts and components that can be built with pure CSS. They are powered by modern CSS features such as flexbox and grid.

And here it is: https://csslayout.io πŸŽ‰πŸŽ‰πŸŽ‰

CSS Layout

They are great starting points to be picked and customized easily for each specific need. By composing them, you can have any possible layout that exists in the real life.

It helps me a lot and hopefully it will help you!

Source code

This is fake JavaScript codes but it covers all the tools that I use to build the website:

this
    .madeWith([react,typescript])
    .then(r => lint(tslint))
    .then(r => lazyLoad(@loadable/component))
    .then(r => optimizeAndBundle(webpack))
    .then(r => exportHtml(react-snap))
    .then(r => deploy(Netlify))
    .then(r => {
        expect(r).is(scalableCode);
        expect(r).is(superFastWebsite);
        expect(r).is(seoFriendly);
    })
    .finally(() => {/* Give me 1 star */}) πŸŽ‰
Enter fullscreen mode Exit fullscreen mode

The entire website is open source, so let's explore and give me one Github star :)

Top comments (15)

Collapse
 
jwp profile image
John Peters

Thanks Phuoc for this post!

Collapse
 
dricomdragon profile image
Jovian Hersemeule • Edited

Hi there, I liked this website to make standalone css myself, but it seems to have closed. Any news about hosting it somewhere else ?

Edit: Got it, it has been moved to another address, here it is : phuoc.ng/collection/css-layout/

Thanks for your amazing work @phuocng !

Collapse
 
andyst81 profile image
andyst81

Great, thank you. I will use this, so I've upvoted and Product Hunt and I've starred on GitHub.

Collapse
 
phuocng profile image
Phuoc Nguyen

Thank a lot! You can subscribe to the newsletter or create an issue for missing pattern!

Collapse
 
the_riz profile image
Rich Winter

Thanks for sharing! (Might wanna double check the mobile layout though, pretty wonky on my Pixel)

Collapse
 
phuocng profile image
Phuoc Nguyen

Yes, it doesn't work well on mobile yet :) I'll try to support as soon as I can.

Collapse
 
shamimahossai13 profile image
Shamima Hossain

useful

Collapse
 
whyohengee profile image
Yong Lee

Dope

I love layout problems, this is super helpful

Collapse
 
phuocng profile image
Phuoc Nguyen

I am glad that you found it useful! Let me know if you have any feedback.

Collapse
 
nguyenquangtin profile image
Tony Tin Nguyen

Thanks Phuoc for the hard works.

Collapse
 
theuserll profile image
L.L.

Great work!

Collapse
 
dongyuhappy profile image
dongyu

thx

Collapse
 
ziizium profile image
Habdul Hazeez • Edited

This is awesome. Bookmarked.