All Projects → JohnnyTheTank → angular-bricklayer

JohnnyTheTank / angular-bricklayer

Licence: MIT license
AngularJS module for ademilter's bricklayer, a lightweight & independent cascading grid layout library

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to angular-bricklayer

Leerraum.js
A PDF typesetting library with exact positioning and hyphenated line breaking
Stars: ✭ 233 (+454.76%)
Mutual labels:  grid, layout
examples
speedata Publisher examples
Stars: ✭ 25 (-40.48%)
Mutual labels:  grid, layout
Magic Grid
A simple, lightweight Javascript library for dynamic grid layouts.
Stars: ✭ 2,827 (+6630.95%)
Mutual labels:  grid, layout
Grid
This package has moved and renamed
Stars: ✭ 2,079 (+4850%)
Mutual labels:  grid, layout
rebass
⚛️ React primitive UI components built with styled-system.
Stars: ✭ 7,844 (+18576.19%)
Mutual labels:  grid, layout
Iota
A responsive micro-framework for the grid spec powered by CSS custom properties.
Stars: ✭ 189 (+350%)
Mutual labels:  grid, layout
react-super-styled
Responsive JSX layouts with Styled Components
Stars: ✭ 77 (+83.33%)
Mutual labels:  grid, layout
Greedo Layout For Android
Full aspect ratio grid LayoutManager for Android's RecyclerView
Stars: ✭ 1,588 (+3680.95%)
Mutual labels:  grid, layout
egjs-grid
A component that can arrange items according to the type of grids
Stars: ✭ 188 (+347.62%)
Mutual labels:  grid, layout
bootstrap-grid-card
Bootstrap grid in Lovelace UI
Stars: ✭ 25 (-40.48%)
Mutual labels:  grid, layout
Shuffle
Categorize, sort, and filter a responsive grid of items
Stars: ✭ 2,170 (+5066.67%)
Mutual labels:  grid, layout
vue-layout-system
A pack of Vue components that solve daily layout problems
Stars: ✭ 31 (-26.19%)
Mutual labels:  grid, layout
Muuri React
The layout engine for React
Stars: ✭ 163 (+288.1%)
Mutual labels:  grid, layout
Styled Bootstrap Components
The bootstrap components made with styled-components 💅
Stars: ✭ 196 (+366.67%)
Mutual labels:  grid, layout
Popo
PoPo is the grid layout tool, the best choice for runtime layout.
Stars: ✭ 130 (+209.52%)
Mutual labels:  grid, layout
flexboxes
CSS flexbox framework with pure flexbox grid ability
Stars: ✭ 27 (-35.71%)
Mutual labels:  grid, layout
Stack Up.js
Create fixed width, variable height grid layouts.
Stars: ✭ 117 (+178.57%)
Mutual labels:  grid, layout
The Grid
Grid layout custom element with drag and drop capabilities
Stars: ✭ 122 (+190.48%)
Mutual labels:  grid, layout
griding
🧱 lean grid & responsive for react
Stars: ✭ 18 (-57.14%)
Mutual labels:  grid, layout
masonry-css
Create mosaic grid, like masonry, with css only
Stars: ✭ 17 (-59.52%)
Mutual labels:  grid, layout

angular-bricklayer

AngularJS module for ademilter's bricklayer, a lightweight & independent cascading grid layout library

npm version Bower version

Demos

Image

Installation

  1. Install via either bower, npm or downloaded files:

    1. via bower: bower install --save angular-bricklayer
    2. via npm: npm install --save angular-bricklayer
    3. via CDN (jsDelivr)
    4. via downloaded files
  2. Include dependencies and angular-bricklayer in your HTML.

    1. When using bower
    <link rel="stylesheet" href="bower_components/bricklayer/dist/bricklayer.min.css">
    <script src="bower_components/bricklayer/dist/bricklayer.min.js"></script>
    <script src="bower_components/angular-bricklayer/dist/angular-bricklayer.min.js"></script>
    1. When using npm
    <link rel="stylesheet" href="node_modules/bricklayer/dist/bricklayer.min.css">
    <script src="node_modules/bricklayer/dist/bricklayer.min.js"></script>
    <script src="node_modules/angular-bricklayer/dist/angular-bricklayer.min.js"></script>
    1. When using CDN
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bricklayer/0.4.3/bricklayer.min.css">
    <script src="//cdnjs.cloudflare.com/ajax/libs/bricklayer/0.4.3/bricklayer.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/[email protected]/dist/angular-bricklayer.min.js"></script>
    1. When using downloaded files
    <link rel="stylesheet" href="YOUR_PATH/bricklayer.min.css">
    <script src="YOUR_PATH/bricklayer.min.js"></script>
    <script src="YOUR_PATH/angular-bricklayer.min.js"></script>
  3. Add jtt_bricklayer to your application's module dependencies, like this:

    angular.module('app', ['jtt_bricklayer']);

Usage

Create a simple list and set the css class bricklayer like this

<div class="bricklayer" ng-cloak>
    <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>

Define bricklayer column size:

@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%;
  }
}

Add bricks dynamically

Use bricklayer-append or bricklayer-prepend as attribute, class or element name inside of your bricklayer instance

<div class="bricklayer" ng-cloak>
    <!-- append -->
    <div bricklayer-append ng-repeat="item in appendData" ng-cloak></div>

    <!-- prepend -->
    <div bricklayer-prepend ng-repeat="item in prependData" ng-cloak></div>
</div>

Images

Since v1.1.0 the grid gets redrawn when images have been loaded, by including and using desandro's imagesloaded

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].