Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-component-respo

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-component-respo

Ember addon for enhancing components with dynamic classes based on their actual size

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ember-component-respo

NPM version Build Status

This is an addon that enhances components with dynamic classes based on their actual sizes, regardless of window width.

🚀 Usage

1. Install addon:

ember install ember-component-respo

2. Setup respo breakpoints and classNameBindings:

export default Ember.Component.extend({
  classNames: ['example-box'],
  classNameBindings: ['respoClassNames'],
  respo: [300, 480, 640],
});

Depending on the actual component's size it will add proper class names on top of it, like so:

<div id="ember332" class="example-box gt-300 gte-300 lt-480 lte-480 lt-640 lte-640 ember-view">
  example box
</div>

Default prefixes are: gt, gte, eq, lt, lte. If you want to disable some, use the object form of respo for configuration:

export default Ember.Component.extend({
  classNames: ['example-box'],
  classNameBindings: ['respoClassNames'],
  respo: {
    breakpoints: [300, 480, 640],
    prefixes: ['gt', 'lt'],
  },
});

🔓 License

This library is released under the MIT license.

Keywords

FAQs

Package last updated on 16 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc