bootstrap expand cards animation

How we can create expanding collapsible card using Bootstrap CSS JS? Solution: See this Bootstrap Expand Cards Animation With CSS, Bootstrap Collapsible Card.

Previously I have shared some card programs, but this is an expandable card with collapse animation. Basically, this type of card majorly used in the backend site of websites because it takes less place and easy to manage. The card opens on when you want, after that it takes space on the webpage.

Today you will learn to create Collapsible Card using Bootstrap. Basically there are 6 cards with dummy inner items, when you will click on that it will expand in the downside. The card contains a title and a number for showing some data about the inner section, and when you will click on it then some sub-items will reveal. Also, these cards have collapsible animation on expanding and hide.

So, Today I am sharing Bootstrap Expand Cards Animation With CSS. There I have used Bootstrap for creating the layout and some functions, and JS handling important features also CSS has an important role.  This type of card you can use on your website for showing more information in less space.

If you are thinking now how this expand cards actually are, then see the preview given below.

Preview Of Collapsible Card

See this video preview to getting an idea of how these cards look like.

Live Demo

Now you can see this visually, also you can see it live by pressing the button given above. If you like this then get the source code of its.

You May Also Like:

Bootstrap Expand Cards Animation With CSS Source Code

Before sharing source code, let’s talk about it. First I have created the layout using bootstrap’s grid system (info). And I have created the first card then I have copied and paste for creating others, later I made some changes in all cards. Inside the all cards section I have put the same class or ID names. Also In the HTML file, I have linked other files like CSS, JS, and Bootstrap CDN link.

Now using CSS I have styled all the items as you can see in the preview. With CSS I have done styling works like margin, padding, size, animation, etc. For creating the collapsible feature I have used CSS transform command, and some other works had done like color using CSS. I have reduced some element’s size and change the grid system using CSS @media query.

Basically, JavaScript handling the toggle feature of the program. There I have used jQuery for easy work and save times, and as we know jQuery is a JS library that’s why I am calling this JavaScript program. For creating the open and close card function I have used JS if {} else {} statement to declare conditions.

Left all other things you will understand after getting the codes, I can’t explain all in writing. For creating this program you have to create 3 files. First for HTML, second for CSS, and the third for JavaScript. Follow the steps to creating this program without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given below.

style.css

Now create a CSS file named ‘style.css‘ and put these codes given here.

function.js

The last step, Create a JavaScript file named ‘function.js‘ and put the codes.

That’s It. Now you have successfully created Bootstrap Expand Cards Animation With CSS, Bootstrap Collapsible Card Program. If you have any doubt or question comment down below.

Thanks For Visiting, Keep Visiting.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here