Skip to content

fpauser/ember-simplebar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status NPM version NPM downloads

ember-simplebar

A scrollbar component that wraps SimpleBar.

Compatibility

  • Ember.js v4.4 or above
  • Ember CLI v4.4 or above
  • Node.js v14 or above

Embroider

This addon is tested against embroider and can be used with the new embroider build system.

Installation

ember install ember-simplebar

Usage

<SimpleBar>
  ...
</SimpleBar>

All supported options of SimpleBar can be given as component arguments, e.g.:

<SimpleBar @autoHide={{true}} @timeout={{200}}>
  ...
</SimpleBar>

SimpleBar yields the current simplebar instance that can be used to e.g. recalculate:

<SimpleBar as |sb|>
  <object
    type='image/svg+xml'
    data='http://path/to/object.svg'
    {{on 'load' sb.recalculate}}
  ></object>
</SimpleBar>

Integration

To use it together with vertical-collection use the containerSelector option:

<SimpleBar>
  <VerticalCollection
    @items={{this.items}}
    @estimateHeight={{50}}
    @containerSelector='.simplebar-content-wrapper'
    as |item|
  >
    {{item}}
  </VerticalCollection>
</SimpleBar>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.