-
Notifications
You must be signed in to change notification settings - Fork 119
Quick Start
Fatih Kadir Akın edited this page Apr 26, 2016
·
8 revisions
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bricklayer/0.4.2/bricklayer.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/bricklayer/0.4.2/bricklayer.min.js"></script>
Please see NPM and Bower instructions if you do not prefer using CDN.
Bricklayer needs a list with bricklayer
class name. First level elements are the bricks.
<div class="bricklayer">
<div>Your item</div>
<div>Your another item</div>
<div>Your another but long item</div>
<div>Your another but very short item</div>
<div>Your one more item</div>
<div>Your smallest item</div>
</div>
.bricklayer-column-sizer
is a virtual element that you don't see in the screen. It's being used to decide column size using media queries.
@media screen and (min-width: 1200px) {
.bricklayer-column-sizer {
/* divide by 3. */
width: 33.3%;
}
}
@media screen and (min-width: 768px) {
.bricklayer-column-sizer {
/* divide by 2. */
width: 50%;
}
}
bricklayer-column-sizer
is the base idea of Bricklayer. Read more about bricklayer-column-sizer
how to use it.
You should build Bricklayer
with a container element.
var bricklayer = new Bricklayer(document.querySelector('.bricklayer'))
bricklayer
instance has some methods ⇢ and emits some events ⇢ which are useful for your interfaces' lifecycle.
If you have any questions, please chat us on Gitter!
Copyright © Bricklayer.js - Adem İlter, Fatih Kadir Akın
- Quick Start
- Installation
- Examples
- Methods
- Events
- Responsiveness
- Plugins
- Frameworks
- License