Skip to content

JamesS-M/ember-delay-class-modifier

Repository files navigation

Build Status Ember Observer Score

ember-delay-class-modifier

This addon provides a {{delay-class-add}} and {{delay-class-remove}} element modifier to modify element's class after a specified duration.

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install ember-delay-class-modifier

Usage

Both modifiers (delay-class-add, delay-class-remove) accept a mandatory first parameter of the class you want to add, and a second optional parameter of the delay (in milliseconds) until the class is added. If a delay is not specified, the default 1000 will be used.

Add-class examples:

<div {{delay-class-add "foo" 5000}}></div>
<button {{delay-class-add "bar"}}></button>

Remove-class examples:

<div {{delay-class-remove "foo" 5000}}></div>
<button {{delay-class-remove "bar"}}></button>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •