A web component to compare two DOM elements
npm install --save-dev two-up-element
This appears on one sideThis appears on the other
Now the user can slide between the two.
Boolean attribute that enables Edge support. The downside is the elements within the
<two-up> become absolutely positioned. This is because CSS
clip is used rather than
This can also be get/set via the boolean property
"vertical". The direction the handle moves.
This can also be get/set via the property
CSS Custom Properties
lib/index.ts- Original TypeScript.
dist/two-up.mjs- JS module. Default exports
dist/two-up.js- Plain JS. Exposes
TwoUpon the global.
dist/two-up-min.js- Minified plain JS. 2.4k gzipped.