git404hub

what is swipe fr?

thebird/swipe — explained in plain English

Analysis updated 2026-06-24

6,755JavaScriptAudience · developerComplexity · 1/5LicenseSetup · easy

tl;dr

A lightweight JavaScript library that turns any set of HTML elements into a touch-friendly slider with swipe gestures, auto-advance, and looping, used by CNN, Airbnb, and Craigslist.

vibe map

mindmap
  root((swipe))
    What it does
      Touch sliders
      Swipe gestures
      Auto-advance
    Features
      Loop endlessly
      Custom speed
      Start position
    API
      Next and prev
      Jump to slide
      Slide callbacks
    Compatibility
      All major browsers
      IE7 fallback
      Mobile and desktop

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Add a swipeable image carousel to a mobile website without a heavy framework.

VIBE 2

Build a touch-friendly slideshow that auto-advances on a timer and loops endlessly.

VIBE 3

Control a content slider programmatically with next, previous, and jump-to-slide buttons.

what's the stack?

JavaScriptCSS

how it stacks up fr

thebird/swipebeakerbrowser/beakerbrunch/brunch
Stars6,7556,7536,758
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyhardeasy
Complexity1/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min
MIT-licensed, use freely for any purpose, including commercial projects, as long as you keep the copyright notice.

in plain english

Swipe is a small JavaScript library that turns a set of HTML elements into a touch-friendly slider. You wrap your content inside two nested containers, point Swipe at the outer one, and it handles all the swiping behavior, including touch gestures on phones and tablets, arrow-based transitions on desktop, and auto-advancing if you want a slideshow effect. Setup requires adding a few lines of CSS to control how the containers sit on the page, then calling the Swipe function once after the page has loaded. From that point the library manages sliding between items automatically when a user swipes or when your own code triggers a transition. Options include setting which slide appears first, controlling how fast transitions animate, enabling an automatic slideshow with a custom interval, and looping endlessly so there is no hard stop at the first or last item. The library also exposes a small API for controlling the slider from your own scripts: you can move to the previous or next slide, jump to a specific position, or ask for the current position and total slide count. Two callback hooks let you run custom code whenever a slide changes and again when the transition animation finishes. Swipe works in all major browsers and falls back gracefully in older environments like IE7 by detecting whether CSS transitions and touch events are available and choosing the right animation method for each case. The README notes that CNN, Craigslist, Airbnb, and the NHL have used it. The project is released under the MIT license. The README is brief and focused entirely on usage, so there is no deeper documentation on internals or contribution guidelines.

prompts (copy fr)

prompt 1
Help me integrate the Swipe library into my HTML page to create a touch-friendly image carousel that auto-advances every 3 seconds and loops back to the start.
prompt 2
Using the Swipe library API, write JavaScript that adds previous and next arrow buttons to control the slider outside the library.
prompt 3
Show me how to set up Swipe so the slider starts on the third slide and fires a custom callback each time the slide changes.

Frequently asked questions

what is swipe fr?

A lightweight JavaScript library that turns any set of HTML elements into a touch-friendly slider with swipe gestures, auto-advance, and looping, used by CNN, Airbnb, and Craigslist.

What language is swipe written in?

Mainly JavaScript. The stack also includes JavaScript, CSS.

What license does swipe use?

MIT-licensed, use freely for any purpose, including commercial projects, as long as you keep the copyright notice.

How hard is swipe to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is swipe for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.