2018-10-12 15:37:13 -04:00
---
title: Panels
---
## Panels
The Bootstrap framework provides you with a feature called panels. A panel is a box that has a styled heading and then a body that allows you to display information in an organized manner, through a set of one or more panels.
2018-11-28 10:28:59 -05:00
Panels were dropped in Bootstrap 4 in favor of cards, as were thumbnails and wells. [Relevant section of the Bootstrap 4 migration guide here ](https://getbootstrap.com/docs/4.1/migration/#panels )
2018-10-12 15:37:13 -04:00
#### How To Use:
To use Bootstrap Panels you add a `<div>` with a class for your type of panel (class `panel panel-default` or something similar, see the panel examples for more information.) and then two nested `<div>` tags, one for the heading (class `panel panel-heading` ) and one for the body (class `panel panel-body` ). You may find that the Code Example is easier to understand than a written explanation.
2019-02-11 10:04:03 -05:00
**Code Example**
```html
< div class = "panel panel-primary" >
< div class = "panel panel-heading" > Panel Header< / div >
< div class = "panel panel-body" > This is a panel with the primary panel style.< / div >
< div class = "panel panel-footer" > Panel Footer< / div >
< / div >
```
2018-10-12 15:37:13 -04:00
#### Panel Examples:
This is a set of examples that shows each type of panel. The CSS Class is displayed above each example.
2019-01-16 01:52:10 +05:30
- default
```html
2018-10-12 15:37:13 -04:00
< div class = "panel panel-default" >
2019-02-11 10:04:03 -05:00
< div class = "panel panel-heading" > Panel Default Header< / div >
< div class = "panel panel-body" > This is a panel with the default panel style.< / div >
< div class = "panel panel-footer" > Panel Default Footer< / div >
2018-10-12 15:37:13 -04:00
< / div >
2019-01-16 01:52:10 +05:30
```
2018-10-12 15:37:13 -04:00
2019-01-16 01:52:10 +05:30
- primary
```html
2018-10-12 15:37:13 -04:00
< div class = "panel panel-primary" >
2019-02-11 10:04:03 -05:00
< div class = "panel panel-heading" > Panel Primary Header< / div >
< div class = "panel panel-body" > This is a panel with the primary panel style.< / div >
< div class = "panel panel-footer" > Panel Primary Footer< / div >
2018-10-12 15:37:13 -04:00
< / div >
2019-01-16 01:52:10 +05:30
```
2018-10-12 15:37:13 -04:00
2019-01-16 01:52:10 +05:30
- success
```html
2018-10-12 15:37:13 -04:00
< div class = "panel panel-success" >
2019-02-11 10:04:03 -05:00
< div class = "panel panel-heading" > Panel Success Header< / div >
< div class = "panel panel-body" > This is a panel with the success panel style.< / div >
< div class = "panel panel-footer" > Panel Success Footer< / div >
2018-10-12 15:37:13 -04:00
< / div >
2019-01-16 01:52:10 +05:30
```
2018-10-12 15:37:13 -04:00
2019-01-16 01:52:10 +05:30
- info
```html
2018-10-12 15:37:13 -04:00
< div class = "panel panel-info" >
2019-02-11 10:04:03 -05:00
< div class = "panel panel-heading" > Panel Info Header< / div >
< div class = "panel panel-body" > This is a panel with the info panel style.< / div >
< div class = "panel panel-footer" > Panel Info Footer< / div >
2018-10-12 15:37:13 -04:00
< / div >
2019-01-16 01:52:10 +05:30
```
2018-10-12 15:37:13 -04:00
2019-01-16 01:52:10 +05:30
- warning
```html
2018-10-12 15:37:13 -04:00
< div class = "panel panel-warning" >
2019-02-11 10:04:03 -05:00
< div class = "panel panel-heading" > Panel Warning Header< / div >
< div class = "panel panel-body" > This is a panel with the warning panel style.< / div >
< div class = "panel panel-footer" > Panel Warning Footer< / div >
2018-10-12 15:37:13 -04:00
< / div >
2019-01-16 01:52:10 +05:30
```
2018-10-12 15:37:13 -04:00
2019-01-16 01:52:10 +05:30
- danger
```html
2018-10-12 15:37:13 -04:00
< div class = "panel panel-danger" >
2019-02-11 10:04:03 -05:00
< div class = "panel panel-heading" > Panel Danger Header< / div >
< div class = "panel panel-body" > This is a panel with the danger panel style.< / div >
< div class = "panel panel-footer" > Panel Danger Footer< / div >
< / div >
2019-01-16 01:52:10 +05:30
```
2018-10-12 15:37:13 -04:00
### More Information
- [Bootstrap dropdown documentation ](https://getbootstrap.com/docs/4.0/components/dropdowns/ )
2019-02-11 10:42:27 -05:00
- [Panels have been replaced with the "card" class in Bootstrap 4 ](https://getbootstrap.com/docs/4.0/components/card/ )
2019-01-16 01:52:10 +05:30
- [Bootstrap v4.0.0 Migration Panels ](https://getbootstrap.com/docs/4.1/migration/#panels/ )