Collection of free CSS flexbox code examples from Codepen and other resources.

Related Articles

  1. CSS Grid Examples
Demo image: Adaptive Photo Layout

Author

  • Tim Van Damme

Made with

  • HTML / CSS (SCSS)

About a code

Adaptive Photo Layout

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Mark Mead

Made with

  • HTML (Pug) / CSS (SCSS)

About a code

Responsive Flexbox Expanding Panels

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Veronica

Made with

  • HTML / CSS

About a code

Flexbox Cards

Same height cards with hover effect.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Veronica

Made with

  • HTML / CSS / JS

About a code

Flexbox Image Carousel

A simple images carousel using Flexbox layout and jQuery.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: jquery.js

Author

  • Shaw

Made with

  • HTML / CSS (Less)

About a code

Flexbox Toggles

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Katherine Kato

Made with

  • HTML / CSS (SCSS) / JS

About a code

Flexbox Image Slider

A simple Flexbox image slider/carousel made with vanilla JavaScript.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: ionicons.css

Author

  • raykuo

Made with

  • HTML (Pug) / CSS (SCSS)

About a code

CSS Thumbnail Responsive Flexbox Hover Transition

A quick example to play around with flexbox hover transition.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Demo image: Material Cards Flexbox

Author

  • diego valobra

Made with

  • HTML / CSS (SCSS) / JS

About a code

Material Cards Flexbox

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: jquery.js

Author

  • Thomas Vaeth

Made with

  • HTML / CSS (SCSS)

About a code

Flexbox Flex-Grow Mast

Flexbox was used for the four column layout with a hover transition on flex-grow.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Tyler Purvines

Made with

  • HTML (Pug) / CSS (SCSSs) / JS (Babel)

About a code

Flexbox Calculator

A calculator written in vanilla JavaScript.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: no

Dependencies: -

Demo image: Flexbox Timeline Layout

Author

  • Paul Barker

Made with

  • HTML / CSS (SCSS)

About a code

Flexbox Timeline Layout

Column-based flexbox timeline layout. The goal is to have clean, semantic HTML while creating a (somewhat complex) timeline-looking layout.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Vail Joy

Made with

  • HTML / CSS / JS

About a code

CSS Responsive Full Screen Duo Layout With Animated Overlay

Using Flexbox and viewport units, we creat a fluid two column layout for a fictional shoe brand, then boost it with CSS animations and transitions to make the interactions more interesting and fun.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: animate.css, font-awesome.css, jquery.js

Author

  • Sean Free

Made with

  • HTML (Pug) / CSS (SCSS) / JS

About a code

Travel Gallery

Flexbox and CSS animations/transitions.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: jquery.js

Demo image: Solving Problems With CSS Grid and Flexbox: The Card UI

Author

  • Envato Tuts+

Made with

  • HTML / CSS

About a code

Solving Problems With CSS Grid and Flexbox: The Card UI

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Demo image: Super Best Flexbox Grid

Author

  • Josh

Made with

  • HTML / CSS (SCSS) / JS (Babel)

About a code

Super Best Flexbox Grid

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -

Author

  • Ryan Mulligan

Made with

  • HTML (Pug) / CSS (SCSS) / JS

About a code

Skewed Flexbox Panels

Experimenting with skew transforms applied to a series of flexbox panels. Switches the flex-direction to columns for smaller screen sizes. Click the toggle button to see panel transitions without background images.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: jquery.js

Author

  • Marcus Hall

Made with

  • HTML (Slim) / CSS (SCSS) / JS

About a code

Fullscreen Menu Flexbox Method

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: jquery.js

Author

  • Mirko Zorić

Made with

  • HTML / CSS / JS

About a code

Fullscreen Flexbox Overlay Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: jquery.js

Author

  • Mai El-Awini

Made with

  • HTML (Pug) / CSS (SCSS)

About a code

Neon Grid Loaders

4 variations of a loading indicator using the same Flexbox grid system.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: yes

Dependencies: -