ember-loading-button
Ember async buttons with loading indicators
Last updated 3 years ago by rajasegar .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ember-loading-button 
SYNC missed versions from official npm registry.

ember-loading-button

Build Status npm npm version MIT license EmberObserver

An Ember button component addon for Asynchronous actions with loading indicators.

Heavily inspired by this Ladda Buttons

Demo

Demo

Installation

  • ember install ember-loading-button

Usage

With Default Loading indicator

{{#loading-button
       transition="expand-left"
       action=(action 'promiseAction')}}
       Submit
{{/loading-button}}

With an optional loading indicator

    {{#loading-button 
      loaderStyle="bars" 
      transition="expand-right" 
      action=(action 'promiseAction')}}
    Submit
    {{/loading-button}}

With customClass to override the styles

    {{#loading-button 
      transition="expand-down" 
      customClass="btn-warning" 
      action=(action 'promiseAction') }}
    Submit
    {{/loading-button}}

Properties

transition

The style for the loading indicator which indicates how and where the loader is placed within the button.

List of available styles:

  • expand-left
  • expand-right
  • expand-down
  • expand-up
  • contract
  • zoom-in
  • zoom-out
  • slide-left
  • slide-right
  • slide-up
  • slide-down

action

Closure action parameter to execute when the button is clicked , will be returning a Promise based on which the button states are derived and the UI is rendered.

customClass

This will get the name of the custom class name with which you want to override your button styles.

size

Various size options for the button

List of available sizes:

  • xs => Extra Small
  • s => Small
  • l => Large
  • xl => Extra Large

loaderStyle

The type of loader you want to choose from:

  • circular-dots-fade
  • bars
  • rotating-slice
  • fading-circle
  • scaling-circles
  • trailing-dots
  • horizontal-dots

Credits

Current Tags

  • 0.1.7                                ...           latest (3 years ago)

7 Versions

  • 0.1.7                                ...           3 years ago
  • 0.1.6                                ...           3 years ago
  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |