Map and motion
Neighbourhood chips
A label and a row of pill links, one per area, with a count. There are two versions: a swipe slider (recommended) and a plain scrolling row.
Examples
Swipe slider (recommended)
Drag or swipe the chips, or use the arrow keys. It keeps moving a little after you let go, and a click still opens the link. Built with Swiper through swiper-init.js.
Jump to a neighbourhood
Plain scrolling row
The same chips in a .scroll-row. It needs no JavaScript and no Swiper, so use it when you do not want the extra files. The visitor scrolls with a wheel, a trackpad or a touch swipe.
Jump to a neighbourhood
How to use the swipe version
- Add Swiper's CSS and JavaScript from the CDN, then
assets/js/swiper-init.min.js(see Swiper hero slider). - Inside
.hood-strip, add<div class="swiper" data-swiper="chips"><div class="swiper-wrapper"> ... </div></div>. - Give each chip both classes:
class="swiper-slide hood-chip". - To use the plain row instead, put the chips in
<div class="scroll-row">and give them onlyhood-chip. No other change is needed.
On phones the label sits above the row. If Swiper does not load, the swipe version falls back to a row that scrolls sideways.
Classes and attributes
| Name | Purpose |
|---|---|
.hood-strip | Wrapper: label and row side by side. |
.hood-strip-label | Bold label on the left. |
.swiper + data-swiper="chips" | The swipe slider. Each chip is a .swiper-slide with .hood-chip. |
.scroll-row | The plain scrolling row (shared component). Use it instead of the slider. |
.hood-chip | One pill link. Put the count in <small>. Turns green on hover. |