ember-simplebar
v5.0.0
Published
Custom scrollbar component using SimpleBar
Downloads
904
Readme
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.