GithubHelp home page GithubHelp logo

brettsenna / brick Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozbrick/brick

0.0 2.0 0.0 15.84 MB

UI Web Components for Mobile Web Apps

Home Page: http://mozilla.github.io/brick/

License: Other

brick's Introduction

Brick

Build Status

Brick is a bundle of re-usable UI components built with x-tags for quickly and flexibly building mobile HTML5 apps. Brick adds new HTML tags- widgets that allow developers to express the structure of an application in a clearer, more concise manner.

In other words, Brick provides minimal-markup, cross-browser implementations of common user interface designs, from calendars to slidebars to cycleable galleries, taking care of most of the under-the-hood boilerplate for you.

For example, this is all the markup that would be needed to implement a mobile-friendly, cross-browser calendar widget:

<x-calendar></x-calendar>

That's it! It really is that easy.

#Installation

Release bundles are provided on Github under this project's Releases tab.

Prebuilt versions of the entire library are also provided in dist/brick.css and dist/brick.js, and should be included in your project like any other CSS/JavaScript file.

Compartmentalized releases of specific components are also released in their respective folders under dist, allowing you to pick and choose what components you want.

Development Prerequisites

You need three things to get started with Brick. NPM, Grunt and Bower.

First install NodeJS/NPM. Once you have npm installed it's easy to install Bower and GruntCLI. Simply run npm install -g bower grunt-cli.

Building from the repository source

Once you have the prerequisites, you're ready to clone and build from source.

Run the following:

git clone [email protected]:mozilla/brick.git
cd brick
npm install
bower install
grunt

The built minified files should be output to dist/brick.css and dist/brick.js.

Development

By default, Brick uses Bower to pull in components, which means that they are not git repositories. If you would like to work on the components within their git repository, then run the following:

bower install       # we use bower to get the repository locations, so this is required
grunt clone-repos   # clone all repositories to ./dev-repos/
grunt build-dev     # build from repositories instead of bower

Now you can work one each component within their respective git repository.

Components

This is a list of the currently bundled components provided in the library. (Click to view subfolder with readme and demo page)

Full documentation can be found on the Brick site.

Structural Components

  • Primary layout container, holds app structure.
  • Allows whole "app" space to have layout properties like flexbox without affecting
  • Contains top-level information and UI
  • Similar to a toolbar or roughly equivalent to Android's action bar
  • Used to display an app-level navigation at the bottom of the UI
  • Usually a series of icons with labels.
  • Tabs are linked to panels/views. Changing tab changes the active panel, and changing the active panel changes the tab
  • Essentially fires a 'show' event at targeted elements. It is up to target elements to respond appropriately.
    • Components with default support for show event:
      • Slidebox
      • Flipbox
      • Deck
  • Can also fire user-defined events
  • Allows a 'slide' filmstrip effect between views or panels
  • Similar to slidebox, but with a perspective flip effect.
  • May be combinable with slidebox and accessed via an option
  • Like a combination of slidebox and flipbox
  • A gallery box in which slides can be cycled in and out independently, with a variety of different transitions
  • Transition types can be switched and overridden on the fly, allowing for a variety of different entrances/exits
  • Content container that appears over current view context
  • Associated with a trigger element in the underlying content
  • Does not necessarily block interaction with underlying content

Content Components

  • A calendar widget based on/extended from fortnight.js, but in a web component format
  • Simple instantiation, with API hooks to allow flexible use cases such as an event-managing calendar (see demo)
  • A polyfill for <input type='date'>, regardless of native browser support for date inputs
  • Ability to select a date and submit its ISO string to a server
  • Extends upon x-calendar to provide a calendar view
  • A simple UI component that creates a button with both an icon and a label
  • Allows multiple anchor locations of the icon and saves the developer from the headache of correctly CSS-centering contents
  • Polyfill on top of <input type='range'>, providing a consistent UI regardless of whether type="range" is supported or not.
  • Unifies checkboxes and radios into a single consistent UI component
  • A set of associated options of which only one can be selected at a time
  • Designed to appear as a cohesive set
  • Essentially several Toggles with the appearance of option buttons

brick's People

Contributors

bcbcarl avatar csuwildcat avatar ldoubleuz avatar nschonni avatar pathawks avatar pennyfx avatar potch avatar sole avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.