JSPM

  • Created
  • Published
  • Downloads 215423
  • Score
    100M100P100Q61440F
  • License MIT

Angular 2 Flexbox Layout

Package Exports

  • @angular/flex-layout/bundles/flex-layout.umd
  • @angular/flex-layout/flexbox/api/base
  • @angular/flex-layout/flexbox/api/flex
  • @angular/flex-layout/flexbox/api/flex-align
  • @angular/flex-layout/flexbox/api/flex-fill
  • @angular/flex-layout/flexbox/api/flex-offset
  • @angular/flex-layout/flexbox/api/flex-order
  • @angular/flex-layout/flexbox/api/hide
  • @angular/flex-layout/flexbox/api/layout
  • @angular/flex-layout/flexbox/api/layout-align
  • @angular/flex-layout/flexbox/api/layout-gap
  • @angular/flex-layout/flexbox/api/layout-wrap
  • @angular/flex-layout/flexbox/api/show
  • @angular/flex-layout/index
  • @angular/flex-layout/media-query/providers/break-points-provider
  • @angular/flex-layout/media-query/providers/match-media-observable-provider

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@angular/flex-layout) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Flex Layout

Angular Flex Layout provides a sophisticated layout API using FlexBox CSS + mediaQuery. This module provides Angular (v2.x and higher) developers with component layout features using a custom Layout API, mediaQuery observables,and injected DOM flexbox-2016 css stylings.

The Layout engine intelligently automates the process of applying appropriate FlexBox CSS to browser view hierarchies. This automation also addresses many of the complexities and workarounds encountered with the traditional, manual, CSS-only application of Flexbox CSS.


The sources for this package are in the Flex-Layout repository.
Please file issues and pull requests against that repo.

License: MIT


BREAKING CHANGE

Directive selectors are now camelCase (instead of dash-case); as specified in the Angular Style Guide (Q4, 2016):

  • @Component selectors always use dash-case
  • @Directive selectors always use camelCase

    Except when the directive is pretending to be a component (i.e, if it had a template it would be '').

  • @Directive properties are prefixed with namespace info

    @Component properties are not

<div class="flex-container" 
     fxLayout="row" 
     fxLayout.xs="column"
     fxLayoutAlign="center center"
     fxLayoutAlign.xs="start">
  <div class="flex-item" fxFlex="20%" fxFlex.xs="40%">  </div>
  <div class="flex-item" fxFlex>        </div>
  <div class="flex-item" fxFlex="25px"> </div>
</div> 

Developers

Demos

Templates


Why choose Flex-Layout

While other Flexbox CSS libraries are implementations of:

  • pure CSS-only implementations, or
  • the JS+CSS Stylesheets implementation of Angular Material v1.x Layouts.

Angular Flex Layout - in contrast - is a pure-Typescript UI Layout engine with an implementation that:

  • uses HTML attributes (aka Layout API) to specify the layout configurations
  • is currently only available for Angular (v2.x or higher) Applications.
  • is independent of Angular Material (v1 or v2).
  • requires no external stylesheets.
  • requires Angular v2.x or higher.

Browser Support

![caniuseflexbox](https://cloud.githubusercontent.com/assets/210413/21288118/917e3faa-c440-11e6-9b08-28aff590c7ae.png)