Legend
Categorical, sequential, and diverging legends for thematic maps.
Preview
Land value
<100k>5M
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-grad"> Legend content </div>
Variants
| Pattern | Effect |
|---|---|
.q2w-grad | Default component shell |
.q2w-grad--compact | Denser layout for small maps |
.q2w-grad--floating | Floating map overlay style |
data-theme="dark" | Uses dark theme tokens automatically |
Sub-elements
| Class | Purpose |
|---|---|
.q2w-grad | Root element for the legend component |
.q2w-grad__head | Optional header/title region |
.q2w-grad__body | Main component content region |
.q2w-grad__actions | Optional action group |