How to create a accordion using bootstrap but inside of that accordion I want a modal that pops up like a form also using bootstrap

67 views Asked by At

I need help I want to create a bootstrap accordion but inside of that I want is a modal pop up button I made a design below. I want to modify the button so it just looks like text, and clone this exactly. I want icons down the left to symbolise the forms. the The body is just those boxes that look like an accordion header but they are smaller and is a Modal.

This is what I've done so far

<div class="accordion" id="accordionExample">
<div class="accordion-item">
  <h2 class="accordion-header" id="headingOne">
      <div>
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<tr class="hover:bg-gray-50 cursor-pointer">
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
    <div class="text-sm font-medium text-brand">Centre Onboarding</div>
  </td>
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 text-center">
    <span class="inline-flex items-center px-3 py-0.5 rounded-full text-sm font-medium bg-gray-100 text-gray-500 border border-gray-500 mr-2">Not Started</span>
  </td>
  <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
    <span class="mr-2">0%</span>
  </td>
</tr>
</button>
</div>
  </h2>
  <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
    <div class="accordion-body">
      Content for Accordion 1
    </div>
  </div>
</div>
<div class="accordion-item">
  <h2 class="accordion-header" id="headingTwo">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
      Accordion 2
    </button>
  </h2>
  <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample">
    <div class="accordion-body">
      Content for Accordion 2
    </div>
  </div>
</div>
<div class="accordion-item">
  <h2 class="accordion-header" id="headingThree">
    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
      Accordion 3
    </button>
  </h2>
  <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="<EUGPSCoordinates>headingThree</EUGPSCoordinates>" data-bs-parent="#accordionExample">
    <div class="accordion-body">
      Content for Accordion 3
    </div>
  </div>
</div>
</div>

and im using these for bootstrap

<!-- BOOTSTRAP -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>


<!-- BOOTSTRAP TOGGLE -->
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">

This is the desired output, the blue links are the modal popup buttons

The blue links are the modal popup buttons The body is just those boxes that look like an accordion header but they are smaller

0

There are 0 answers