1. Reference
  2. Display

<swiper>

Swipeable pages side by side, one at a time, with dots below that show which page is on screen.

Display

This tag has more than one name. Every spelling is the same tag, so write whichever feels natural. Pick one and every example on this page uses it.

swiper.ham
<swiper height="240">
    <img src="https://hypeapps.dev/gallery/assets/landscape.jpg"
         style="w-full h-240 rounded-xl"
         fit="cover"/>
    <img src="https://hypeapps.dev/gallery/assets/city.jpg"
         style="w-full h-240 rounded-xl"
         fit="cover"/>
    <img src="https://hypeapps.dev/gallery/assets/dish.jpg"
         style="w-full h-240 rounded-xl"
         fit="cover"/>
</swiper>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
height Carousel height in pixels
number
200
initial-page Starting page index
number
0
show-indicators Show page indicator dots
boolean
true

Readings

NameWhat it does
index The page shown, from 0.

Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.

This page is also Markdown, and all of HAM is in llms.txt.