Skip to content

Meditation App Onboarding with Goals

Meditation app onboarding screen where users pick goals as selectable cards, set a daily reminder time and days, then see their plan, with a step counter.

Also known as: mindfulness app onboarding, goal selection screen, daily reminder setup screen, wellness app welcome flow, multi step onboarding mobile

Meditation App Onboarding with Goals live demo

Open in new tab

Pure CSS code (HTML, CSS, JS)

A meditation app onboarding screen in pure CSS and vanilla JavaScript: users pick their goals from selectable cards, choose a daily reminder time and days, and finish on a short plan summary. It is an HTML mobile template for mobile websites and PWAs and can be packaged as a native app with Capacitor. Use it as the welcome flow of a mindfulness or sleep app.

How it works

The root .mog-app is a 430 px app column with a top bar, three [data-mog-panel] steps and a sticky footer button. The top bar shows "Step 1 of 3" in [data-mog-count], three .mog-dot progress dots, a Back button and Skip.

Step 1 is a fieldset of .mog-goal cards. Each card is a label around a real checkbox, so tapping, Space and screen readers all work; the selected look comes from :has(input:checked). The footer badge [data-mog-selected] counts the chosen goals, and Continue shows an error if none is selected.

Step 2 offers three .mog-time presets (radio buttons), an exact type="time" field kept in sync with them, seven .mog-day toggles and a "Gentle sound" switch. At least one day is required.

Step 3 fills the .mog-summary list from the answers and suggests a first session from the FIRST_SESSION map in script.js. goTo() toggles the hidden attribute of the panels, updates the dots and counter, changes the button label and moves focus to the new heading. Skip jumps to the summary with reminders off.

Customization

  • --mog-primary and --mog-primary-dark in style.css: buttons, selected cards, dots and focus rings.
  • --mog-bg, --mog-line and --mog-radius in .mog-app: page tint, card borders and corner rounding.
  • Add or remove .mog-goal labels in step 1; the colour of each icon tile comes from modifiers such as .mog-goal__icon--sleep.
  • FIRST_SESSION in script.js: the session title suggested for each goal value.
  • Change the value of the .mog-time radios and their .mog-time__val text to offer other preset times.
  • Remove checked from the goal inputs to start with nothing selected (the demo preselects two goals).

Use cases

  • Meditation and mindfulness apps: new users choose sleep, focus or stress goals before their first session.
  • Sleep and relaxation apps: set an evening reminder and wind-down days in one step.
  • Habit and journaling apps: collect goals and a daily check-in time during sign up.
  • Corporate wellbeing portals: personalise content for employees on their first visit.

Accessibility

Goals, times and days are native checkboxes and radios inside fieldset elements with legends, so they are keyboard operable and announced with their state. The switch uses role="switch". Errors use role="alert", the step counter is a polite live region and focus moves to each step heading. All targets are at least 44 px, focus rings are visible and animations are disabled under prefers-reduced-motion.

Usage notes

Add a fetch() call where the comment in the final step of the click handler says so to save the plan. Uses Nunito from Google Fonts and Bootstrap Icons.

Meditation App Onboarding with Goals at a glance

Framework
Pure CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
fonts.googleapis.com, Bootstrap Icons
Layout
Mobile-first app screen, centred on wider screens
Category
Onboarding Screens
License
Free for personal and commercial use

Questions about this template

Can I use the Meditation App Onboarding with Goals code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load fonts.googleapis.com and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Can I turn this screen into an iOS or Android app?

Yes. It is plain HTML, CSS and JavaScript, so it works in a mobile website or progressive web app as it is. To ship it as a store app, put it in the web folder of a Capacitor or Cordova project and build it for iOS and Android; replace the sample data with calls to your own API.

How does it look on a desktop screen?

The screen is designed for phones. On wider screens it stays at phone width in the middle of the page, so it still looks like an app. The live demo opens at mobile width; use the Tablet and Desktop buttons to check other sizes.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap">
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Meditation App Onboarding with Goals – Pure CSS onboarding screens component screenshot
Meditation App Onboarding with Goals · Pure CSS Onboarding Screens

More Onboarding Screens

Language Learning App Onboarding – Bootstrap 6 onboarding screens preview

Language Learning App Onboarding

Language learning app onboarding screen with flag language picker, level choice, daily goal and progress bar: a three-step mobile app onboarding flow with swipe support.

News App Topic Picker Onboarding – Tailwind CSS onboarding screens preview

News App Topic Picker Onboarding

News app topic picker onboarding screen: follow topics as chips with follower counts, search them and continue once three interests are selected.

Banking App Welcome and Permissions – Bootstrap 5 onboarding screens preview

Banking App Welcome and Permissions

Banking app welcome screen with a notifications and Face ID permission flow, clear explanations, Allow and Not now buttons and a setup summary.

Fitness App Onboarding Screens – Tailwind CSS onboarding screens preview

Fitness App Onboarding Screens

Fitness app onboarding screens with three swipeable steps, SVG illustrations, progress dots, Skip and Get started, built as a mobile app intro walkthrough.