Installation

Ember-basic-dropdown is distributed as an Ember CLI addon. To install it, run the following command in your ember project directory

$ ember install ember-basic-dropdown

When installing this through ember install the addon will add the necessary snippet above automatically in your app.

Manual installation

After the installation you need to add the following lines somewhere in your templates where you want to render the dropdown content into e.g. your application.hbs. In this component will be rendered the dropdown content.

If you use vanilla CSS, you need to add the following line into app.js or in any route/controller/component .js/.ts file:

Instead of adding the styling in an .js file and depending from your build config you can also add the css in any template/component css file by using following line

However, if you are using SASS or LESS you need to add an import statement to your styles.

If you are using LESS there is also necessary to register the paths in lessOptions

The styles of the addon are very minimal and deal mostly with positioning. You can tweak a couple things but we'll get to that later.

Now let's learn the API of the component.