Footer
React Bootstrap 5 Footer component
A footer is an additional navigation component. It can hold links, buttons, company info, copyrights, forms, and many other elements.
Basic example
A basic example of the simple footer with text, links and copyright section.
The background color is set via prop bg
. Default value is
light
You can set your own color choosing from
MDB color palette
or by setting a completely custom color via inline CSS, for example
style="background-color: #9933CC;"
. In this case you
should set bg
property value to none
.
We put a mask on the copyrights section using RGBA code to outstand it. You can change the intensity of its color by manipulating the last value in the RGBA code.
Advanced example
An advanced example of Bootstrap Footer.
We applied a dark background by using
bgColor="dark"
property. With such settings, it's necessary to
use color="white"
for typography and links,
outline="light"
for buttons, and
.form-white
for the form.
White background and secondary icons
Our new minimal design for the footer with subtle secondary-colored icons.
Supported content
Footers can hold multiple different components. Below a few of the most common examples of footer usage.
Copyrights
As mentioned before - we put a mask on the copyrights section using RGBA code to outstand it. You can change the intensity of its color by manipulating the last value in the RGBA code.
Links
You can adjust the number of the columns by using grid system.
Text
For more advanced text options have a look at the Typography docs or Text utilities docs .
Images
For more advanced images options have a look at the Images docs .
Iframe (embeds)
For more advanced iframe options have a look at the Ratio docs .
Icons
For more advanced icon options have a look at the Icons docs and Buttons docs.
Call to action
An example of Call to Action scheme within the Footer.
Forms
Simple usage of the inline form within the Footer and with use of the grid. By default it's left aligned.
For more advanced icon options have a look at the Forms docs and Grid docs.
Form centered
An example of centered form within the Footer.
For more advanced icon options have a look at the Horizontal alignment docs.
Form dark theme
An example of dark theme Footer with the form inside
To use forms properly on a dark background add
text="white"
for typography and links,
outline="light"
for buttons, and
.form-white
for the form.
For more advanced color options have a look at the Colors docs and Theme docs.
Colors
As mentioned before - the background color is set via property
bg
. You can set your own color choosing from
MDB color palette
or by setting a completely custom color via inline CSS, for example
style="background-color: #9933CC;"
. In this case you
should set bg
property value to none
.
When changing the color of the footer to the darker remember to change also the color of the containing elements.
In the example below, we add text="white"
color to change
the color of the text to white and we replace
.text-dark
class in the links to
.text-white
as well.
Alignment
By default, all elements inside the Footer are left-aligned on every screen size. However, you can easily change it and center it on all screen sizes or only on the specific breakpoint.
For more advanced icon options have a look at the Alignment docs.
Left-aligned
Default left-aligned Footer
Always centered
Add .text-center
className to the
footer
element to center the content.
Centered on small
To center elements of the Footer only on small screens add
.text-center .text-md-start
classes to the
footer
element.
With these properties, elements will only be centered on screens
smaller than
768 px
wide. On larger screens, they will be
left-aligned by default.
To learn more about Bootstrap breakpoints read Breakpoints docs.
Footer - API
Import
Properties
MDBFooter
Name | Type | Default | Description | Example |
---|---|---|---|---|
bgColor
|
"primary" | "secondary" | "success" | "info" | "warning" | "danger" | "light" | "dark" | '' |
Change color of footer |
<MDBFooter bgColor="primary" />
|
color
|
"primary" | "secondary" | "success" | "info" | "warning" | "danger" | "light" | "dark" | "body" | "muted" | "white" | "black-50" | "white-50" |
|
Change color of text in footer |
<MDBFooter color="white" />
|
ref
|
React.Ref<any> |
|
A reference to the MDBFooter component |
<MDBFooter ref={someRef} />
|
tag
|
React.ComponentProps<any> | 'footer' |
Defines tag of the MDBFooter element |
<MDBFooter tag="section" />
|