Skip to content
v0.9.1
Helpers

Scroll in

Things that slide or fade in the first time they scroll into view, for landing pages. Add data-momo-in to anything. Plus a thin reading progress bar for long articles.

Scroll in

These demos play again each time they come back into view (data-momo-in-repeat), so scroll them out and back, or press the button.

up
the default
zoom
150ms later
fade
300ms later
start
from the side
down
from above
end
from the other side
<div class="grid sm:grid-cols-3 gap-4" id="in-demo">
  <div class="box p-6 text-center" data-momo-in="up" data-momo-in-repeat><b>up</b><br><span class="text-muted text-sm">the default</span></div>
  <div class="box p-6 text-center bg-yellow-soft" data-momo-in="zoom" data-momo-in-repeat data-momo-in-delay="150"><b>zoom</b><br><span class="text-muted text-sm">150ms later</span></div>
  <div class="box p-6 text-center bg-violet-soft" data-momo-in="fade" data-momo-in-repeat data-momo-in-delay="300"><b>fade</b><br><span class="text-muted text-sm">300ms later</span></div>
  <div class="box p-6 text-center" data-momo-in="start" data-momo-in-repeat><b>start</b><br><span class="text-muted text-sm">from the side</span></div>
  <div class="box p-6 text-center bg-green-soft" data-momo-in="down" data-momo-in-repeat data-momo-in-delay="150"><b>down</b><br><span class="text-muted text-sm">from above</span></div>
  <div class="box p-6 text-center" data-momo-in="end" data-momo-in-repeat data-momo-in-delay="300"><b>end</b><br><span class="text-muted text-sm">from the other side</span></div>
</div>
<button class="btn btn-sm mt-4" type="button" onclick="document.querySelectorAll('#in-demo [data-momo-in]').forEach(function(e){e.classList.remove('is-in');void e.offsetWidth;e.classList.add('is-in')})"><i class="mi mi-refresh-cw" aria-hidden="true"></i> Play again</button>

One after another

data-momo-in-stagger on a list or grid brings its children in one by one, 80ms apart (or the number you give it).

Fast

One small file.

Phones

Folds to fit.

For everyone

Keys and screen readers.

<div class="features" data-momo-in-stagger="120" data-momo-in-repeat id="stagger-demo">
  <div class="feature"><span class="feature-icon bg-yellow-soft"><i class="mi mi-bolt" aria-hidden="true"></i></span><h3>Fast</h3><p>One small file.</p></div>
  <div class="feature"><span class="feature-icon bg-violet-soft"><i class="mi mi-smartphone" aria-hidden="true"></i></span><h3>Phones</h3><p>Folds to fit.</p></div>
  <div class="feature"><span class="feature-icon bg-green-soft"><i class="mi mi-accessibility" aria-hidden="true"></i></span><h3>For everyone</h3><p>Keys and screen readers.</p></div>
</div>
<button class="btn btn-sm mt-4" type="button" onclick="var s=document.getElementById('stagger-demo');[...s.children].forEach(function(e){e.classList.remove('is-in')});void s.offsetWidth;[...s.children].forEach(function(e){e.classList.add('is-in')})"><i class="mi mi-refresh-cw" aria-hidden="true"></i> Play again</button>

Options

AttributeDoes
data-momo-inup (default), down, start, end, fade or zoom
data-momo-in-stagger="80"On a parent: its children come in one after another, this many milliseconds apart
data-momo-in-delay="200"Wait this many milliseconds first
data-momo-in-speedslow (1s) or fast (0.35s); the default is 0.6s
data-momo-in-repeatPlay every time it comes into view, not only the first
--in-distanceHow far it travels (24px)

Use it on a few headings and sections, not on everything: motion is there to guide the eye, and text that keeps moving is hard to read.

Reading progress

Put <div class="scroll-progress" aria-hidden="true"></div> anywhere in the page: a thin bar along the very top fills as the page is read. .scroll-progress-below puts it under a sticky navbar. This page has one: look at the top as you scroll.

Class / settingDoes
.scroll-progressThe bar, fixed along the top in the brand color
.scroll-progress-belowUnder a sticky or fixed navbar
--scroll-progress-color / --scroll-progress-hIts color and height (4px)

Accessibility

Start

OverviewStart Getting startedStart CustomizeStart

Guides

AccessibilityGuides BreakpointsGuides ChangelogGuides Customize componentsGuides JavaScriptGuides MotionGuides OptimizeGuides PhonesGuides RebootGuides Right-to-left (RTL)Guides Stacking orderGuides Using Momo with AIGuides

Foundations

ColorsFoundations TypographyFoundations ProseFoundations Images & figuresFoundations CodeFoundations Lines & shadowsFoundations Dark modeFoundations

Forms

Checkbox & switchForms ComboboxForms Date pickerForms Date rangeForms Fields & labelsForms File uploadForms Floating labelsForms Number stepperForms PasswordForms PIN codeForms RatingForms SelectForms SliderForms Tag inputForms Time pickerForms ValidationForms

Components

AccordionComponents Alert & bannerComponents AvatarComponents BadgeComponents BreadcrumbComponents ButtonComponents Button groupComponents CalendarComponents CardComponents CarouselComponents ChartsComponents ChipsComponents CollapseComponents Command paletteComponents CommentsComponents Confirm dialogsComponents Cookie bannerComponents Data tableComponents Description listComponents Dialog & toastComponents DividerComponents DrawerComponents Dropdown menuComponents Empty stateComponents File managerComponents Filter & sortComponents Gallery & lightboxComponents Inbox & chatComponents Infinite scrollComponents KanbanComponents Keyboard shortcutsComponents List groupComponents MarqueeComponents Media objectComponents Nav overflowComponents Notification centerComponents PaginationComponents ProgressComponents Pull to refreshComponents SkeletonComponents SortableComponents SpinnerComponents Split viewComponents Stat cardComponents Steps & wizardComponents Swipe actionsComponents TableComponents TabsComponents TimelineComponents TogglerComponents Tooltip & popoverComponents TourComponents Tree viewComponents VideoComponents WhiteboardComponents

Layout

Announcement barLayout App shellLayout Back to topLayout Container & sectionLayout ExamplesLayout FooterLayout HeroLayout JumbotronLayout Mega menuLayout NavbarLayout Site sidebarLayout

Sections

Bento gridSections Blog cardsSections Call to actionSections Contact & newsletterSections FAQSections FeaturesSections Logo cloudSections PricingSections TeamSections TestimonialsSections

Utilities

OverviewUtilities State variantsUtilities Display & flexUtilities Grid & gapUtilities SpacingUtilities SizingUtilities TextUtilities Links & color strengthUtilities Position & overflowUtilities BackgroundsUtilities Borders & effectsUtilities Transforms & filtersUtilities InteractionsUtilities

Helpers

Fixed, sticky & frostedHelpers Hover & focusHelpers Hover revealHelpers Icon linkHelpers PrintHelpers Relative timeHelpers Screen reader textHelpers Scroll inHelpers ScrollspyHelpers Share buttonHelpers Skip linkHelpers StacksHelpers Stretched linkHelpers Theme toggleHelpers Truncated textHelpers

Page patterns

404 pagePage patterns Coming soonPage patterns Login & registerPage patterns SettingsPage patterns ProfilePage patterns CRM contactsPage patterns ProjectsPage patterns File manager pagePage patterns Billing & plansPage patterns Help centerPage patterns Mobile app screensPage patterns
↑ ↓ moveEnter openEsc close