Skip to the page content

Accordion

Panels that open and close in place, on Bootstrap's accordion.

Bootstrap docs

16 accordion types

Basic

Bootstrap's accordion as it ships, in Basalt colors. Every panel names the accordion as its parent, so opening one closes the others.

Behavior

Drag a visit onto a team member's row and it shows up in their app straight away.

Each morning's visits are put in the shortest driving order, inside their service windows.

Built from the supplies and hours on the visit, then sent by email or SMS when it closes.
Show code
<div class="accordion" id="features">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button" type="button" data-bs-toggle="collapse"
              data-bs-target="#feature-1" aria-expanded="true"
              aria-controls="feature-1">Schedule</button>
    </h3>
    <div id="feature-1" class="accordion-collapse collapse show" data-bs-parent="#features">
      <div class="accordion-body">Drag a visit onto a team member's row.</div>
    </div>
  </div>
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
              data-bs-target="#feature-2" aria-expanded="false"
              aria-controls="feature-2">Travel</button>
    </h3>
    <div id="feature-2" class="accordion-collapse collapse" data-bs-parent="#features">
      <div class="accordion-body">Visits in the shortest driving order.</div>
    </div>
  </div>
</div>

Always open

Leave out data-bs-parent and each panel opens and closes on its own, so several can be open side by side for comparing.

Behavior

14 carers, mostly home care. Busiest in the first cold week of the year.

9 dog walkers and pet sitters on rounds. Same-day visits fill half the board.

6 cleaners on homes and offices. Rounds run long, so visits are booked in pairs.
Show code
<div class="accordion" id="territories">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button" type="button" data-bs-toggle="collapse"
              data-bs-target="#territory-1" aria-expanded="true"
              aria-controls="territory-1">North territory</button>
    </h3>
    <!-- No data-bs-parent: this panel ignores the others -->
    <div id="territory-1" class="accordion-collapse collapse show">
      <div class="accordion-body">…</div>
    </div>
  </div>
</div>

Disabled item

Add disabled to the header button and the item stays shut. It drops out of the tab order and turns quiet, with a reason next to it.

Behavior

Garden tidy-ups at $129 and a free first visit on new lawn plans until the end of August.

Leaf clearing and gutter cleaning at the autumn rate from September.

Still being planned.
Show code
<h3 class="accordion-header">
  <button class="accordion-button collapsed" type="button" disabled
          data-bs-toggle="collapse" data-bs-target="#prices-winter"
          aria-expanded="false" aria-controls="prices-winter">
    Winter price sheet
    <span class="ac-tag"><i class="bi bi-lock" aria-hidden="true"></i>From December</span>
  </button>
</h3>

Flush

No outer border and no rounded corners, so the accordion sits edge to edge inside a card, a sidebar or a list.

Layout

Unused SMS credit packs can be refunded in full within 30 days.

Every plan includes email support, and we answer by the next working day at the latest.

Up to six people a session, at $350 each. You keep the recording.
Show code
<div class="accordion accordion-flush" id="help">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
              data-bs-target="#help-1" aria-expanded="false"
              aria-controls="help-1">Returns</button>
    </h3>
    <div id="help-1" class="accordion-collapse collapse" data-bs-parent="#help">
      <div class="accordion-body">…</div>
    </div>
  </div>
</div>

Separated

Each item is its own rounded card with a gap between them. The open one lifts with a primary border.

Layout

Out by 7:30 am. Check the board, pack the car and confirm the first visit with the customer.

Close the morning visits in the app, pick up supplies at the office and take the 1:00 to 5:00 pm windows.

Sync the app, log the car mileage and submit the time sheet.
Show code
<!-- ac-separated turns each item into its own card -->
<div class="accordion ac-separated" id="shifts">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button" type="button" data-bs-toggle="collapse"
              data-bs-target="#shift-1" aria-expanded="true"
              aria-controls="shift-1">Morning shift</button>
    </h3>
    <div id="shift-1" class="accordion-collapse collapse show" data-bs-parent="#shifts">
      <div class="accordion-body">…</div>
    </div>
  </div>
</div>

Sizes

The default for most pages, compact for side panels and dense settings, and large for a help page. One class changes the padding and type size.

Layout

Visits default to two hours. Change the length per visit type under Settings.

Send the SMS reminder 24 hours before the visit.

Send the invoice when the visit closes, due in 14 days.
Show code
<!-- ac-size-sm for compact, ac-size-lg for large, nothing for the default -->
<div class="accordion" id="setup">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button" type="button" data-bs-toggle="collapse"
              data-bs-target="#setup-1" aria-expanded="true"
              aria-controls="setup-1">Visit defaults</button>
    </h3>
    <div id="setup-1" class="accordion-collapse collapse show" data-bs-parent="#setup">
      <div class="accordion-body">…</div>
    </div>
  </div>
</div>

Horizontal

Panels slide open sideways from a row of tabs, using Bootstrap's width collapse. One panel is always open. On a phone the row turns into a normal stacked accordion.

Layout

Morning care

Morning and evening visits to an older client at home. The most booked visit type on the board.

Length
90 min
Crew
1 person
Checklist
24 steps

Walk and feed

Same-day walks, with a photo update sent to the owner after every single walk.

Length
60 min
Crew
1 person
Checklist
12 steps

Two-bed move

A full day on site. The parking permit and the lift are booked before the crew arrives.

Length
8 h
Crew
2 people
Checklist
31 steps

Window rounds

A quarterly visit on a cleaning plan, with a photo of every window when done.

Length
45 min
Crew
1 person
Checklist
18 steps
Show code
<div class="ac-h" id="job-types">
  <div class="ac-h-item">
    <button class="ac-h-btn" type="button" data-bs-toggle="collapse"
            data-bs-target="#job-1" aria-expanded="true" aria-controls="job-1">
      <span class="ac-h-num">01</span><span class="ac-h-label">Morning care</span>
    </button>
    <!-- collapse-horizontal animates the width instead of the height -->
    <div id="job-1" class="ac-h-panel collapse collapse-horizontal show"
         data-bs-parent="#job-types">
      <div class="ac-h-inner">…</div>
    </div>
  </div>
  <!-- more .ac-h-item blocks -->
</div>

Nested

A flush accordion inside a panel of another one. Each level has its own parent, so opening an inner panel never closes the outer one.

Layout

Sculpted Shoulder Blazer at $1,290, built in Illinois from grain de poudre wool.

Draped Column Gown at $2,150, cut from silk jersey woven in Kansas.

Two-Tone Oxfords at $850 and the Cat-Eye Sunglasses at $465.

Leather Trench Coat at $3,200, Bar Loafers at $790 and the Chalk-Stripe Suit at $2,450.

The Made-to-Measure Tailoring at $1,150, and Private Styling Sessions at $350 each.
Show code
<div class="accordion" id="store">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button" type="button" data-bs-toggle="collapse"
              data-bs-target="#store-devices" aria-expanded="true"
              aria-controls="store-devices">Clothing</button>
    </h3>
    <div id="store-devices" class="accordion-collapse collapse show" data-bs-parent="#store">
      <div class="accordion-body">
        <!-- The inner accordion points at its own parent -->
        <div class="accordion accordion-flush" id="store-devices-list">
          <div class="accordion-item">
            <h4 class="accordion-header">…</h4>
            <div class="accordion-collapse collapse" data-bs-parent="#store-devices-list">…</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

With icons

A small icon tile and a second line in each header, so a long list is quick to scan. The tile picks up the open color.

Header content

Every one-off starts with a short first visit. Supplies used on the day go on the invoice by themselves.

A care plan books the next visit as soon as the current one closes, so nothing slips.

Moves get a two-person crew, a parking checklist and photos before and after.
Show code
<button class="accordion-button" type="button" data-bs-toggle="collapse"
        data-bs-target="#jobs-repair" aria-expanded="true" aria-controls="jobs-repair">
  <span class="ac-icon" aria-hidden="true"><i class="bi bi-lightning"></i></span>
  <span class="ac-head">
    <span class="ac-head-title">One-offs</span>
    <span class="ac-head-sub">Extra and same-day visits</span>
  </span>
</button>

With badges and counts

A count or a status sits at the end of the header, just before the chevron, so you can see what is inside without opening it.

Header content

Twelve visits are on today's board, and three of them are waiting for a key.

Signed this week by Oakhaven Studio, Lakeside Apparel, Harborline AI and Evergreen Landscaping.

Gloves and aprons in car 4 are below the reorder level. The next delivery is on Thursday.
Show code
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
        data-bs-target="#stock-van" aria-expanded="false" aria-controls="stock-van">
  <span class="ac-head-title">Car kit</span>
  <span class="ac-tag ac-tag-low">2 low</span>
  <span class="ac-count">9<span class="visually-hidden"> items</span></span>
</button>

Right-aligned toggle

The chevron gives way to a Show and Hide label on the right. The words swap with the state, and screen readers still hear it from aria-expanded.

Indicators

Medication visits now need a second signature and a photo of the chart before the visit can close.

Crews start from the north and south offices. Rounds are rebuilt each morning from the day's bookings.

Refer another service business and both accounts get a month free once they start paying.
Show code
<div class="accordion ac-texttoggle" id="info">
  …
  <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
          data-bs-target="#info-2" aria-expanded="false" aria-controls="info-2">
    <span class="ac-head-title">Where the crews work</span>
    <span class="ac-toggle" aria-hidden="true">
      <span class="ac-toggle-show">Show</span><span class="ac-toggle-hide">Hide</span>
    </span>
  </button>
  …
</div>

Indicator styles

The same accordion with four open and closed markers: Bootstrap's chevron, plus and minus, a caret, or a chevron in front of the title. Each one is a single class on the accordion.

Indicators

$15 per seat a month. Scheduling, the schedule board and invoices for small teams.

$32 per seat a month. Adds travel planning, care plans and time sheets.

$58 per seat a month. Territories, custom checklists and a named account manager.
Show code
<!-- ac-ind-plus, ac-ind-caret or ac-ind-start; no class for the chevron -->
<div class="accordion" id="plans">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button" type="button"
              data-bs-toggle="collapse" data-bs-target="#plan-1"
              aria-expanded="true" aria-controls="plan-1">Basic</button>
    </h3>
    <div id="plan-1" class="accordion-collapse collapse show" data-bs-parent="#plans">
      <div class="accordion-body">…</div>
    </div>
  </div>
</div>

Expand all and collapse all

Buttons outside the accordion open or close every panel through Bootstrap's Collapse API. A line keeps count, and each button switches off when there is nothing left for it to do.

Interactive

1 of 4 open

Monday to Friday 7:00 am to 6:00 pm, Saturday 8:00 am to 12:00 pm. Visits booked outside these hours go to the on-call carer.

Twelve ZIP codes around the main office. Visits further out add a $45 travel charge to the estimate.

Card on site through the app, bank transfer, or a pay link sent with the invoice.

Customers get an SMS the day before a visit and another when the carer is on the way.
Show code
<button type="button" class="btn btn-sm btn-outline-secondary"
        data-expand="show" aria-controls="info-1 info-2">Expand all</button>
<button type="button" class="btn btn-sm btn-outline-secondary"
        data-expand="hide" aria-controls="info-1 info-2">Collapse all</button>

<div class="accordion" id="info">…</div>

<script>
  document.querySelectorAll('[data-expand]').forEach((btn) => {
    btn.addEventListener('click', () => {
      document.querySelectorAll('#info .accordion-collapse').forEach((panel) => {
        bootstrap.Collapse.getOrCreateInstance(panel, { toggle: false })[btn.dataset.expand]();
      });
    });
  });
</script>

Lazy-loaded content

Each panel fetches its content the first time it opens and shows a placeholder while it waits. After that it stays loaded. Here the fetch is faked with a short delay.

Interactive

0 of 3 loaded

Show code
<div id="orders" class="accordion-collapse collapse"
     data-bs-parent="#reports" data-src="/api/orders/today">
  <div class="accordion-body"></div>
</div>

<script>
  document.querySelectorAll('[data-src]').forEach((panel) => {
    panel.addEventListener('show.bs.collapse', async () => {
      if (panel.dataset.loaded) return;
      panel.dataset.loaded = 'true';
      const body = panel.querySelector('.accordion-body');
      body.setAttribute('aria-busy', 'true');
      body.innerHTML = await (await fetch(panel.dataset.src)).text();
      body.removeAttribute('aria-busy');
    });
  });
</script>

Stepped

Numbered panels opened in order. Continue closes the step, writes the answer into its header and unlocks the next one. Steps you have done stay open to change.

Interactive

Piece

Extras

Show code
<div class="accordion ac-steps" id="order">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <!-- Later steps start with the disabled attribute -->
      <button class="accordion-button collapsed" type="button" disabled
              data-bs-toggle="collapse" data-bs-target="#order-2"
              aria-expanded="false" aria-controls="order-2">
        <span class="ac-step-num" aria-hidden="true">2</span>
        <span class="ac-head">
          <span class="ac-head-title">Extras</span>
          <span class="ac-head-sub">Not chosen yet</span>
        </span>
      </button>
    </h3>
    <div id="order-2" class="accordion-collapse collapse" data-bs-parent="#order">
      <div class="accordion-body">… <button class="btn btn-primary btn-sm">Continue</button></div>
    </div>
  </div>
</div>

FAQ with search

A search box above an accordion. Typing hides the questions that don't match, opens the ones that do and marks every hit. Clearing the box puts the list back as it was.

Interactive

9 questions

Try

Very little. Live location checks in every few minutes and the camera only runs for a photo, so a long day on the app never ends early.

Yes. Visits, checklists and photos save on the phone and sync when the signal comes back. Nothing is lost when the car drives through a dead zone.

Every plan includes 500 texts a month. After that, SMS Credits come in packs of 1,000 for $25 and carry over for a year.

Any time before your next billing date. Pause a seat from Billing for up to three months, and the team member's visit history stays where it is.

Open Team, choose Add team member and send the invite. They sign in on the app with their phone number, and the seat is billed from the next billing date.

Imports sent before noon finish the same day. Big ones take one to two working days, and we email you the moment they are done.

Annual billing gives two months free on every plan. Teams over 50 seats can talk to sales about Max pricing.

Yes, with the Customer Portal add-on at $4 per seat a month. Customers pick a service window, approve estimates and pay invoices there.

For $1,250 we import your customers, set up your visit types and checklists, and run two live training sessions for the office team.
Show code
<input type="search" class="form-control" id="qa-search"
       aria-describedby="qa-count">
<p id="qa-count" aria-live="polite">9 questions</p>

<!-- No data-bs-parent, so every match can be open at once -->
<div class="accordion" id="faq">
  <div class="accordion-item">
    <h3 class="accordion-header">
      <button class="accordion-button collapsed" type="button"
              data-bs-toggle="collapse" data-bs-target="#qa-1"
              aria-expanded="false" aria-controls="qa-1">
        Can staff work offline?
      </button>
    </h3>
    <div id="qa-1" class="accordion-collapse collapse">
      <div class="accordion-body">Yes. Visits, checklists and photos save on the phone…</div>
    </div>
  </div>
</div>

<script>
  // For each item: hide it when it doesn't match, open it when it does.
  const panel = item.querySelector('.accordion-collapse');
  bootstrap.Collapse.getOrCreateInstance(panel, { toggle: false }).show();
</script>