webdevpuneet.com

Mobile Onboarding Screens — Free App Intro UI Snippet

Mobile Onboarding Screens · Mobile · Plain HTML, CSS & JS · Live preview

Copy & paste

Source Code

<div class="ob-phone">
  <div class="ob-screen">
    <div class="ob-top"><span>9:41</span><button type="button" class="ob-skip" id="obSkip">Skip</button></div>
    <div class="ob-track" id="obTrack">
      <div class="ob-slide">
        <div class="ob-art a1"><span class="ob-blob"></span><span class="ob-glyph">📊</span></div>
        <h2>Track everything</h2>
        <p>See all your accounts and spending in one clean dashboard.</p>
      </div>
      <div class="ob-slide">
        <div class="ob-art a2"><span class="ob-blob"></span><span class="ob-glyph">⚡</span></div>
        <h2>Move money fast</h2>
        <p>Send, request, and split payments in just a couple of taps.</p>
      </div>
      <div class="ob-slide">
        <div class="ob-art a3"><span class="ob-blob"></span><span class="ob-glyph">🔒</span></div>
        <h2>Bank-grade security</h2>
        <p>Your data is encrypted end-to-end and protected with Face ID.</p>
      </div>
    </div>
    <div class="ob-foot">
      <div class="ob-dots" id="obDots"><span class="on"></span><span></span><span></span></div>
      <button type="button" class="ob-next" id="obNext">Next</button>
    </div>
  </div>
</div>

Extend with AI

Take This Snippet Further With AI

The AI prompt for this one is for Patreon supporters ($3 a month), along with a site with no ads. Supporters enter the passcode once and it is remembered in this browser.

· Become a supporter

What's included

Features

Sliding track
One translateX moves between full-width slides.
Swipe and buttons
Both navigate through a single go() function.
Worm progress dots
The active dot stretches into a pill.
Morphing blobs
Animated border-radius art with no images.
Threshold swipe
Pointer delta past 45px changes slides.
Context-aware controls
Final slide relabels Next and hides Skip.
No desync
Dots, label, and slide always agree.
No dependency
Pure HTML/CSS/JS, no carousel library.

About this UI Snippet

Mobile Onboarding Screens — Swipeable App Intro Carousel

Screenshot of the Mobile Onboarding Screens snippet rendered live

An onboarding flow is the set of intro screens a new user swipes through on first launch — each pitching one feature with an illustration, a headline, and a line of copy, with progress dots and a skip option. This snippet builds a complete, swipeable one inside a CSS phone frame in HTML, CSS, and vanilla JavaScript with no dependency, ready to adapt to any app.

A sliding track of full-width slides

All slides sit in a flex .ob-track where each slide is min-width: 100%, so they line up horizontally. Navigation is a single transform: translateX(-index * 100%) on the track, transitioned with a cubic-bezier ease — moving between screens is just changing one index and letting CSS animate the slide. There's no per-slide show/hide, which keeps state trivial and the motion smooth.

Swipe and buttons share one navigator

A go(i) function clamps the index, sets the transform, updates the dots, and relabels the button — every navigation path funnels through it. The Next button advances, Skip jumps to the last slide, and a pointer swipe (comparing start and end clientX against a 45px threshold) moves a slide in either direction. Because they all call go(), the dots, button label, and slide position can never desync.

Animated progress dots

The dots aren't just filled circles — the active one stretches into a pill (width animates from 7px to 22px) while the others stay small, the modern "worm" indicator. It's driven by toggling an .on class, with a CSS transition doing the morph, so it reads as a continuous progress bar split into segments.

Morphing blob illustrations

Each slide's art is an emoji glyph over a gradient blob whose organic shape comes from a multi-value border-radius (e.g. 42% 58% 63% 37% / 45% 38% 62% 55%) animated between two shapes on an infinite obMorph keyframe. It gives lively, on-brand artwork with zero images — swap the gradient and glyph per slide to match your features.

Context-aware controls

On the last slide the Next button becomes "Get started" and Skip hides, because skipping the final screen makes no sense — small touches that make the flow feel finished. Wire the final button to your home route or auth screen.

Reusing it

Keep the slide structure and replace the copy, glyphs, and gradients. Drop it into a phone mockup for presentations, or lift it out as a responsive web onboarding carousel.

Step by step

How to Use

  1. 1
    Paste HTML, CSS, and JSA three-screen onboarding flow renders in a phone frame.
  2. 2
    Press NextThe track slides to the next screen and the dots advance.
  3. 3
    SwipeDrag left or right to move between slides past a threshold.
  4. 4
    Tap SkipJump straight to the final get-started screen.
  5. 5
    Reach the endNext becomes Get started and Skip hides.
  6. 6
    CustomizeSwap the copy, glyphs, and blob gradients per feature.

Real-world uses

Common Use Cases

First-run feature intros
Introduce an app's best features one per screen, with morphing blob art, a headline and a line of copy inside a phone mockup.
Feature tour alternatives
Offer a lighter option than an onboarding tour, where swiping or buttons both call one go() function.
Hand-off to sign-in
End on a get-started button that leads to a mobile login screen, completing the first-launch story.
Web intro carousels
Lift the sliding track out as a web carousel, keeping the worm-style dots where the active dot stretches into a pill.
Step-based walkthroughs
Pair with a progress wizard when onboarding includes real input steps, not just slides, and keep a skip option.
Related: Mobile Keyboard Guide — Correct inputmode/type/pattern Per Field
See the Mobile Keyboard Guide — Correct inputmode/type/pattern Per Field for a related mobile pattern worth pairing with this one.

Got questions?

Frequently Asked Questions

All slides live in a flex track, each at min-width 100%, so they sit side by side. Moving is a single transform: translateX(-index * 100%) on the track with a CSS transition, so changing the index animates the slide. There's no per-slide visibility toggling, which keeps the logic and the motion simple.

Every navigation — Next, Skip, and swipe — calls one go(i) function that clamps the index, sets the transform, updates the progress dots, and relabels the button. Because there's a single source of truth, the dots, the button text, and the visible slide can never drift out of agreement.

A pointerdown records the start X, and a window pointerup compares the end X. If the horizontal delta is less than -45 pixels it advances, more than +45 it goes back, otherwise it stays — a threshold that ignores tiny accidental drags. Listening for pointerup on the window catches releases even outside the track.

No. Each is an emoji glyph layered over a gradient blob whose organic shape comes from a multi-value border-radius animated between two shapes on an infinite keyframe. Swapping the gradient and glyph per slide gives distinct, lively artwork for each feature with no image assets to load.

Keep the active index in state and bind the track's transform to it. Implement Next, Skip, and swipe handlers that update the index. Render slides from a data array of glyph, title, and copy. The progress dots derive from the index. In Tailwind, set slides to w-full shrink-0 in a flex track and animate the active dot's width.