✔️ 5kb minified!
✔️ Responsive!
✔️ Custom content!
✔️ Multiple views!
✔️ Vanilla JS!
Remus works by manipulating element container's width to show or hide a part of the content. It takes up 100% of its container's width and assumes that your content has enough width to fill. It resizes content dynamically by applying main container's width to content.
Install with NPM:
npm install remusjs --save
And import in your project:
import Remus from 'remusjs';
Don't forget the CSS:
import from 'remus/src/remus.css';
SCSS:
@import '~remusjs/src/remus';
Just download minified sources and add them to your HTML:
<link rel="stylesheet" href="remus.min.css">
<script src="remus.min.js"></script>
Wrap the images or other content you want to compare in a remus-element
class:
<div class="remus">
<div class="remus-element">
<img src="" alt="">
</div>
<div class="remus-element">
<img src="" alt="">
</div>
</div>
...and initialize Remus:
var remus = new Remus({
element: '.remus', // selector for main Remus container
height: null // height value in pixels if you want it to be fixed - optional
});
Remus is licensed under MIT license.