Developing Vue Apps with the Quasar Library — Masonry Grid

John Au-Yeung
3 min readFeb 13, 2021
Photo by Rithika Gopalakrishnan on Unsplash

Quasar is a popular Vue UI library for developing good looking Vue apps.

In this article, we’ll take a look at how to create Vue apps with the Quasar UI library.

Masonry Grid

We can render Quasar’s q-table component as a masonry grid.

For instance, we can write:

<!DOCTYPE html>
<html>
<head>
<link
href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons"
rel="stylesheet"
type="text/css"
/>
<link
href="https://cdn.jsdelivr.net/npm/quasar@1.12.13/dist/quasar.min.css"
rel="stylesheet"
type="text/css"
/>
</head>
<body class="body--dark">
<script src="https://cdn.jsdelivr.net/npm/vue@^2.0.0/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/quasar@1.12.13/dist/quasar.umd.min.js"></script>
<style>
.grid-masonry {
flex-direction: column;
height: 700px;
}
.grid-masonry--2 > div:nth-child(2n + 1) {
order: 1;
}
.grid-masonry--2 > div:nth-child(2n) {
order: 2;
}
.grid-masonry--2:before {
content: "";
flex: 1 0 100% !important;
width: 0 !important;
order: 1;
}
.grid-masonry--3 > div:nth-child(3n + 1) {…

--

--

No responses yet