Skip to content
v0.9.1
Components

Accordion

Sections that open and close. Built on the native <details> element: it works without JavaScript, with the keyboard, and with find-in-page (the browser opens the section that holds the match).

Basic

A .accordion of details.accordion-items, each with a <summary> and an .accordion-body. Give them the same name so only one is open at a time; leave it out to let several open.

Are these components accessible?

Yes. They use native elements where they exist, work with the keyboard, and are tested with real input.

Do I need JavaScript?

Not for the accordion. momo.js adds the interactive parts like selects, menus and the kanban board.

Can I change the colors?

Pick a brand color on the Customize page, or set --momo-brand yourself.

<div class="accordion">
  <details class="accordion-item" name="faq" open>
    <summary>Are these components accessible?</summary>
    <div class="accordion-body"><p>Yes. They use native elements where they exist, work with the keyboard, and are tested with real input.</p></div>
  </details>
  <details class="accordion-item" name="faq">
    <summary>Do I need JavaScript?</summary>
    <div class="accordion-body"><p>Not for the accordion. <code>momo.js</code> adds the interactive parts like selects, menus and the kanban board.</p></div>
  </details>
  <details class="accordion-item" name="faq">
    <summary>Can I change the colors?</summary>
    <div class="accordion-body"><p>Pick a brand color on the Customize page, or set <code>--momo-brand</code> yourself.</p></div>
  </details>
</div>

With icons and hints

Put an icon first in the summary, and an .accordion-hint (a count or a status) before the chevron.

Account 3 settings
Notifications On
Privacy & security

Two-step sign-in is on.

<div class="accordion">
  <details class="accordion-item">
    <summary><i class="mi mi-user"></i> Account <span class="accordion-hint">3 settings</span></summary>
    <div class="accordion-body">
      <div class="form-field"><label class="form-label" for="ac-name">Display name</label><input class="form-control" id="ac-name" value="Alexander K."></div>
    </div>
  </details>
  <details class="accordion-item">
    <summary><i class="mi mi-bell"></i> Notifications <span class="accordion-hint">On</span></summary>
    <div class="accordion-body"><label class="switch"><input type="checkbox" role="switch" checked> Email digest</label></div>
  </details>
  <details class="accordion-item">
    <summary><i class="mi mi-shield"></i> Privacy &amp; security</summary>
    <div class="accordion-body"><p>Two-step sign-in is on.</p></div>
  </details>
</div>

Open all, close all

A button with data-momo-accordion="#id" opens every item, or closes them all when they are already open. Leave the shared name off the items, so several can be open at once. data-accordion-do="open" or "close" makes a button that only does one of the two.

How long does shipping take?

Two to four working days in Europe, five to eight elsewhere.

Can I change my address after ordering?

Yes, until the order is packed. Write to us with the order number.

How do returns work?

You have 30 days. A prepaid label is in the box.

<div class="cluster mb-3">
  <button class="btn btn-sm" type="button" data-momo-accordion="#acc-ship" id="acc-all"><span class="toggler-swap"><i class="mi mi-chevrons-up-down"></i></span> Open or close all</button>
  <button class="btn btn-sm btn-ghost" type="button" data-momo-accordion="#acc-ship" data-accordion-do="close" id="acc-close">Close all</button>
</div>
<div class="accordion" id="acc-ship">
  <details class="accordion-item" open>
    <summary>How long does shipping take?</summary>
    <div class="accordion-body"><p>Two to four working days in Europe, five to eight elsewhere.</p></div>
  </details>
  <details class="accordion-item">
    <summary>Can I change my address after ordering?</summary>
    <div class="accordion-body"><p>Yes, until the order is packed. Write to us with the order number.</p></div>
  </details>
  <details class="accordion-item">
    <summary>How do returns work?</summary>
    <div class="accordion-body"><p>You have 30 days. A prepaid label is in the box.</p></div>
  </details>
</div>

Flush and cards

.accordion-flush drops the outer box (inside cards and side panels). .accordion-cards makes each item its own box, for FAQ pages.

Filters
Date

Any time

Why copy and paste, not a package?

Both work: link momo.css, or copy the parts you need.

How do I contribute?

Open an issue with what you'd like to see.

<div class="accordion accordion-flush">
  <details class="accordion-item"><summary>Filters</summary><div class="accordion-body"><label class="check"><input type="checkbox" checked> Paid</label> <label class="check"><input type="checkbox"> Pending</label></div></details>
  <details class="accordion-item"><summary>Date</summary><div class="accordion-body"><p class="text-muted">Any time</p></div></details>
</div>
<p></p>
<div class="accordion accordion-cards">
  <details class="accordion-item" name="faq2"><summary>Why copy and paste, not a package?</summary><div class="accordion-body"><p>Both work: link <code>momo.css</code>, or copy the parts you need.</p></div></details>
  <details class="accordion-item" name="faq2"><summary>How do I contribute?</summary><div class="accordion-body"><p>Open an issue with what you'd like to see.</p></div></details>
</div>

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