Java-Applets.org

Bootstrap Accordion List

Intro

Web pages are the most popular field to display a powerful ideas as well as appealing information in simple and pretty cheap method and get them attainable for the entire world to check out and get used to. Will the material you've provided earn viewers's passion and attention-- this stuff we can never ever figure out before you really provide it live for hosting server. We can however suppose with a very great opportunity of correcting the effect of some components over the visitor-- determining probably from our unique experience, the excellent methods defined over the net as well as most generally-- by the manner a web page influences ourselves while we're delivering it a design during the design procedure. One point is sure though-- great spaces of plain text are very probable to bore the user as well as push the viewers out-- so just what to produce whenever we simply just really need to apply such greater amount of text-- for example conditions and terms , commonly asked questions, tech standards of a product line as well as a professional services which have to be described and exact etc. Well that is actually things that the style process in itself narrows down in the end-- spotting working solutions-- and we should find a method working this one out-- display the content needed in pleasing and intriguing way nevertheless it could be 3 pages clear text prolonged.

A marvelous method is wrapping the text message in to the so called Bootstrap Accordion Group element-- it offers us a highly effective way to feature just the captions of our content clickable and present on page and so typically all web content is readily available at all times in a small area-- commonly a single display so the user may easily click on what is essential and have it expanded to become knowledgeable with the detailed material. This kind of solution is certainly as well natural and web style since small actions ought to be taken to go on working with the webpage and in such manner we have the visitor progressed-- somewhat "push the tab and see the light flashing" stuff.

Tips on how to make use of the Bootstrap Accordion Form:

Accordion example

Increase the default collapse behaviour to set up an Bootstrap Accordion Example.

Accordion  model

Accordion  representation
Accordion  good example
<div id="accordion" role="tablist" aria-multiselectable="true">
  <div class="card">
    <div class="card-header" role="tab" id="headingOne">
      <h5 class="mb-0">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
          Collapsible Group Item #1
        </a>
      </h5>
    </div>

    <div id="collapseOne" class="collapse show" role="tabpanel" aria-labelledby="headingOne">
      <div class="card-block">
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
      </div>
    </div>
  </div>
  <div class="card">
    <div class="card-header" role="tab" id="headingTwo">
      <h5 class="mb-0">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
          Collapsible Group Item #2
        </a>
      </h5>
    </div>
    <div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo">
      <div class="card-block">
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
      </div>
    </div>
  </div>
  <div class="card">
    <div class="card-header" role="tab" id="headingThree">
      <h5 class="mb-0">
        <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
          Collapsible Group Item #3
        </a>
      </h5>
    </div>
    <div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree">
      <div class="card-block">
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
      </div>
    </div>
  </div>
</div>

Inside Bootstrap 4 we receive the perfect devices for generating an accordion prompt and easy employing the newly provided cards components incorporating just a few added wrapper elements. Listed below is the way: To begin developing an accordion we first require an element to wrap the whole thing into-- provide a

<div>
element and assign it an ID-- something like
id="MyAccordionWrapper"
or so attribute. ( more tips here)

Next step it is undoubtedly moment to generate the accordion panels-- include a

.card
element, inside it-- a
.card-header
to form the accordion headline. Inside the header-- put in an original headline like
h1-- h6
with the
. card-title
class selected and in this headline wrap an
<a>
element to definitely have the heading of the panel. In order to control the collapsing panel we're about to make it really should have
data-toggle = "collapse"
attribute, its target must be the ID of the collapsing component we'll produce in a minute like
data-target = "long-text-1"
for instance and at last-- to make confident only one accordion component stays extended at a time we should really in addition incorporate a
data-parent
attribute leading to the master wrapper for the accordion in our good example it must be
data-parent = "MyAccordionWrapper"

Another example

 Yet another example
<!DOCTYPE html>
<title>My Example</title>

<!-- Bootstrap 4 alpha CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css" integrity="sha384-2hfp1SzUoho7/TsGGGDaFdsuuDL0LX2hnUp6VkX3CUQ2K4K+xjboZdsXyp4oUHZj" crossorigin="anonymous">
<style>
body 
padding-top: 1em;
 
</style>
<div class="container-fluid">
    
<div id="faq" role="tablist" aria-multiselectable="true">

<div class="card">
<div class="card-header" role="tab" id="questionOne">
<h5 class="card-title">
<a data-toggle="collapse" data-parent="#faq" href="#answerOne" aria-expanded="false" aria-controls="answerOne">
What if my boots are too big for my feet?
</a>
</h5>
</div>
<div id="answerOne" class="collapse" role="tabcard" aria-labelledby="questionOne">
<div class="card-block">
Stuff your boots with newspaper or tissue.
</div>
</div>
</div>

<div class="card">
<div class="card-header" role="tab" id="questionTwo">
<h5 class="card-title">
<a class="collapsed" data-toggle="collapse" data-parent="#faq" href="#answerTwo" aria-expanded="false" aria-controls="answerTwo">
Can I wear my boots inside?
</a>
</h5>
</div>
<div id="answerTwo" class="collapse" role="tabcard" aria-labelledby="questionTwo">
<div class="card-block">
No. Your mama should've told you about this.
</div>
</div>
</div>

<div class="card">
<div class="card-header" role="tab" id="questionThree">
<h5 class="card-title">
<a class="collapsed" data-toggle="collapse" data-parent="#faq" href="#answerThree" aria-expanded="true" aria-controls="answerThree">
What if my boots get slippery when wet?
</a>
</h5>
</div>
<div id="answerThree" class="collapse in" role="tabcard" aria-labelledby="questionThree">
<div class="card-block">
Keep your boots dry.
</div>
</div>
</div>

</div>

</div>
    
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha384-THPy051/pYDQGanwU6poAc/hOdQxjnOEXzbT+OuUAFqNqFjL+4IGLBgCJC3ZOShY" crossorigin="anonymous"></script>

<!-- Tether -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>

<!-- Bootstrap 4 Alpha JS -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/js/bootstrap.min.js" integrity="sha384-VjEeINv9OSwtWFLAtmc4JCtEJXXBub00gtSnszmspDLCtC0I4z4nqz7rEFbIZLLU" crossorigin="anonymous"></script>

<!-- Initialize Bootstrap functionality -->
<script>
// Initialize tooltip component
$(function () 
  $('[data-toggle="tooltip"]').tooltip()
)

// Initialize popover component
$(function () 
  $('[data-toggle="popover"]').popover()
)
</script>

After this is performed it is definitely time for designing the component that will definitely stay hidden and carry the actual information behind the headline. To work on this we'll wrap a

.card-block
in a
.collapse
component together with an ID attribute-- the similar ID we must place like a goal for the web link in the
.card-title
from above-- for the example it really should be just like
id ="long-text-1"

As soon as this system has been established you can easily insert either the plain text or else further wrap your material developing a little more complicated system. ( click here)

Expanded web content

Repeating the practice from above you can surely add in as many components to your accordion as you require to. And assuming that you want a web content feature to display extended-- specify the

.in
or possibly
.show
classes to it baseding upon the Bootstrap 4 build version you are actually utilizing-- up to Alpha 5 the
.in
class proceeds and within Alpha 6 it gets removed and replaced by
.show

Final thoughts

So basically that is certainly ways you can deliver an perfectly functioning and pretty great looking accordion having the Bootstrap 4 framework. Do note it uses the card feature and cards do extend the whole space provided by default. So integrated together with the Bootstrap's grid column solutions you have the ability to quickly make complex appealing formats putting the entire stuff within an element with specified amount of columns width.

Look at several online video information regarding Bootstrap Accordion

Connected topics:

Bootstrap accordion main documentation

Bootstrap acoordion  approved  records

How to make a Bootstrap v4 accordion collapse when clicking the whole header div?

How to make a Bootstrap v4 accordion collapse when clicking the whole header div?

GitHub:Collapse Accordion is still using Panels

GitHub:Collapse Accordion is still using Panels