.q2w-compare

Compare

Swipe comparison shell for before/after or two map layers.

Preview

Usage

Use this component inside a qgis2web Leaflet export after loading q2w-mapcss.css. Keep generated map JavaScript unchanged unless your workflow needs custom behavior.

<div class="q2w-compare">
  Compare content
</div>

Variants

PatternEffect
.q2w-compareDefault component shell
.q2w-compare--compactDenser layout for small maps
.q2w-compare--floatingFloating map overlay style
data-theme="dark"Uses dark theme tokens automatically

Sub-elements

ClassPurpose
.q2w-compareRoot element for the compare component
.q2w-compare__headOptional header/title region
.q2w-compare__bodyMain component content region
.q2w-compare__actionsOptional action group
← Slider Draw →