Bootstrap CSS - Simple collapsible panels

Lightening is a new era of salesforce view and style. It follows more of bootstrap syntax and responsive so that all variety device screens can use them.

I tried a simple panel which can replace page block sections and output panels.

code and demo given below:

Code Snippet: Demo Here

<apex:page sidebar="false" showHeader="false" standardStylesheets="false">
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
    <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

    <div class="container">
        <h2>Collapsible List Group</h2>
        
        <div class="panel-group">
            <div class="panel panel-default">
            
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="panel-link" data-toggle="collapse" href="#collapse1">Collapsible list group</a>
                    </h4>
                </div>
                
                <div id="collapse1" class="panel-collapse collapse in">
                    <div class="panel-body">
                        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="panel panel-default">
            
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="panel-link" data-toggle="collapse" href="#collapse2">Collapsible list group</a>
                    </h4>
                </div>
                
                <div id="collapse2" class="panel-collapse collapse in">
                    <div class="panel-body">
                        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="panel panel-default">
            
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="panel-link" data-toggle="collapse" href="#collapse3">Collapsible list group</a>
                    </h4>
                </div>
                
                <div id="collapse3" class="panel-collapse collapse in">
                    <div class="panel-body">
                        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="panel panel-default">
            
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a class="panel-link" data-toggle="collapse" href="#collapse4"><b> VF Page Code Snippet </b></a>
                    </h4>
                </div>
                
                <div id="collapse4" class="panel-collapse collapse in">
                    <div class="panel-body">
                        TEST
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <style>
    .panel-heading a:after {
        font-family:'Glyphicons Halflings';
        content:"\e114";
        float: left;
        color: grey;
    }
    .panel-heading a.collapsed:after {
        content:"\e080";
    }
    .panel-link {
        margin-left : 1%;
        font-weight : bold;
    }
    </style>   
</apex:page>

Comments