1.0.1 • Published 6 years ago

@veams/component-comparer v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Comparer

Description

The component represents a comparison handler.

It allows you to layer two images on top of each another and compare them via a draggable slider.


Requirements


Installation

Installation with Veams

veams install component comparer
veams -i c comparer

Fields

comparer.hbs

Settings

ParameterTypeValueDescription
settings.comparerContextClassStringdefaultContext class of component.
settings.comparerClassesStringModifier classes for component.
settings.jsOptionsObjectJavaScript options which gets stringified.

JavaScript Options

The module gives you the possibility to override default options:

ParameterTypeValueDescription
handleString'[data-js-item="comparer-handle"]Define the handler element.
topContainerString'[data-js-item="comparer-top-container"]Define the element for top container.
topContentString'[data-js-item="comparer-top-content"]Define the content element in top container.
draggClassString'is-draggingDefine the dragging class.
dragModeBooleantrueEnable or disable drag mode.
topContentRightBooleanfalseReverse the drag mode direction.
disabledObject{'mobile-s': false, 'mobile-m': false, 'mobile-l': false, 'tablet-s': false, 'tablet-l': false, 'desktop-s': false, 'desktop-m': false, 'desktop-l': false}Define on which viewport the module is enabled.

Sass Options

There are multiple global variables which you can change:

ParameterDefault ValueDescription
$comparer-color-light#fff !defaultHandle color.
1.0.1

6 years ago

1.0.0

6 years ago