FAQ component / section
React FAQ
Responsive React FAQ Page with Bootstrap 5. Templates include accordion FAQ template, collapse FAQ component, FAQ section & customized Bootstrap FAQ components.
FAQ is an abbreviation from "Frequently Asked Questions", FAQ is usually a section of a page or a full page itself. Building a FAQ with the latest Bootstrap 5 usually requires using components like accordion or collapse.
Basic examples
FAQ with Accordion
Building your FAQ with the use of the accordion component, helps you make your design more elegant by reducing the space needed for your Frequently Asked Questions section.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
.accordion-body
, though the transition does limit overflow.
import React from "react";
import { MDBAccordion, MDBAccordionItem, MDBContainer } from "mdb-react-ui-kit";
export default function App() {
return (
<MDBContainer className="mt-5" style={{maxWidth: '1000px'}}>
<MDBAccordion alwaysOpen initialActive={1}>
<MDBAccordionItem collapseId={1} headerTitle="Question #1">
<strong>This is the first item's accordion body.</strong> It is shown
by default, until the collapse plugin adds the appropriate classes
that we use to style each element. These classes control the overall
appearance, as well as the showing and hiding via CSS transitions. You
can modify any of this with custom CSS or overriding our default
variables. It's also worth noting that just about any HTML can go
within the <code>.accordion-body</code>, though the transition does
limit overflow.
</MDBAccordionItem>
<MDBAccordionItem collapseId={2} headerTitle="Question #2">
<strong>This is the second item's accordion body.</strong> It is
hidden by default, until the collapse plugin adds the appropriate
classes that we use to style each element. These classes control the
overall appearance, as well as the showing and hiding via CSS
transitions. You can modify any of this with custom CSS or overriding
our default variables. It's also worth noting that just about any HTML
can go within the <code>.accordion-body</code>, though the transition
does limit overflow.
</MDBAccordionItem>
<MDBAccordionItem collapseId={3} headerTitle="Question #3">
<strong>This is the third item's accordion body.</strong> It is hidden
by default, until the collapse plugin adds the appropriate classes
that we use to style each element. These classes control the overall
appearance, as well as the showing and hiding via CSS transitions. You
can modify any of this with custom CSS or overriding our default
variables. It's also worth noting that just about any HTML can go
within the <code>.accordion-body</code>, though the transition does
limit overflow.
</MDBAccordionItem>
</MDBAccordion>
</MDBContainer>
);
}
Static FAQ section
A static FAQ page is the best choice when you don't have many questions & answers to display. In that case you can consider leveraging the grid functionalities to display your questions in columns. You can also sprinkle some suitable icons on top to make your design more interesting.
FAQ
Find the answers for the most frequently asked questions below
A simple question?
Absolutely! We work with top payment companies which guarantees your safety and security. All billing information is stored on our payment processing partner.
A question that is longer then the previous one?
Yes, it is possible! You can cancel your subscription anytime in your account. Once the subscription is cancelled, you will not be charged next month.
A simple question?
Currently, we only offer monthly subscription. You can upgrade or cancel your monthly account at any time with no further obligation.
A simple question?
Yes. Go to the billing section of your dashboard and update your payment information.
A simple question?
Unfortunately no. We do not issue full or partial refunds for any reason.
Another question that is longer than usual
Of course! We’re happy to offer a free plan to anyone who wants to try our service.
import React from "react";
import {
MDBCol,
MDBContainer,
MDBIcon,
MDBRow,
MDBTypography,
} from "mdb-react-ui-kit";
export default function StaticFaqSection() {
return (
<MDBContainer>
<section>
<MDBTypography
tag="h3"
className="text-center mb-4 pb-2 text-primary fw-bold"
>
FAQ
</MDBTypography>
<p className="text-center mb-5">
Find the answers for the most frequently asked questions below
</p>
<MDBRow>
<MDBCol md="6" lg="4" className="mb-4">
<MDBTypography tag="h6" className="mb-3 text-primary">
<MDBIcon far icon="paper-plane text-primary pe-2" /> A simple
question?
</MDBTypography>
<p>
<strong>
<u>Absolutely!</u>
</strong>{" "}
We work with top payment companies which guarantees your safety
and security. All billing information is stored on our payment
processing partner.
</p>
</MDBCol>
<MDBCol md="6" lg="4" className="mb-4">
<MDBTypography tag="h6" className="mb-3 text-primary">
<MDBIcon fas icon="pen-alt text-primary pe-2" /> A question that
is longer then the previous one?
</MDBTypography>
<p>
<strong>
<u>Yes, it is possible!</u>
</strong>{" "}
You can cancel your subscription anytime in your account. Once the
subscription is cancelled, you will not be charged next month.
</p>
</MDBCol>
<MDBCol md="6" lg="4" className="mb-4">
<MDBTypography tag="h6" className="mb-3 text-primary">
<MDBIcon fas icon="user text-primary pe-2" /> A simple question?
</MDBTypography>
<p>
Currently, we only offer monthly subscription. You can upgrade or
cancel your monthly account at any time with no further
obligation.
</p>
</MDBCol>
<MDBCol md="6" lg="4" className="mb-4">
<MDBTypography tag="h6" className="mb-3 text-primary">
<MDBIcon fas icon="rocket text-primary pe-2" /> A simple question?
</MDBTypography>
<p>
Yes. Go to the billing section of your dashboard and update your
payment information.
</p>
</MDBCol>
<MDBCol md="6" lg="4" className="mb-4">
<MDBTypography tag="h6" className="mb-3 text-primary">
<MDBIcon fas icon="home text-primary pe-2" /> A simple question?
</MDBTypography>
<p>
<strong>
<u>Unfortunately no</u>.
</strong>{" "}
We do not issue full or partial refunds for any reason.
</p>
</MDBCol>
<MDBCol md="6" lg="4" className="mb-4">
<MDBTypography tag="h6" className="mb-3 text-primary">
<MDBIcon fas icon="book-open text-primary pe-2" /> Another
question that is longer than usual
</MDBTypography>
<p>
Of course! We’re happy to offer a free plan to anyone who wants to
try our service.
</p>
</MDBCol>
</MDBRow>
</section>
</MDBContainer>
);
}
FAQ with contact form
It's a great practice to include a contact form in your FAQs, by adding an email input and a simple textarea. That way your users can ask you about things not included in the answers. You can replace it with a login form if you want only logged users to be able to ask questions, or with a comment box, if you would like new user questions to be visible for everyone.
Standard length question?
Higlighted short answer. And some kind of detailed list.
- list item 1
- list item 2
- list item 3
Short question?
Higlighted short answer.
Second part of the answer with more details.
Final part of the answer full of detais and Lorem ipsum dolor sit amet consectetur adipisicing elit.
The longest question in this faq. Made up of two sentences in order to span to the next line?
Higlighted short answer.
Second part of the answer with more details.
Final part of the answer full of detais and Lorem ipsum dolor sit amet consectetur adipisicing elit.
Slightly longer question?
Higlighted short answer.
Second part of the answer with more details.
Final part of the answer full of detais and Lorem ipsum dolor sit amet consectetur adipisicing elit.
Still have any questions? Contact us to get your answer!
import React from "react";
import {
MDBBtn,
MDBCol,
MDBContainer,
MDBInput,
MDBRow,
MDBTextArea,
} from "mdb-react-ui-kit";
export default function WithContactForm() {
return (
<MDBContainer className="mt-5" style={{maxWidth: '1000px'}}>
<section>
<MDBRow>
<MDBCol lg="6" md="12" className="mb-4">
<div>
<p className="mb-1">
<strong>Standard length question?</strong>
</p>
<p className="mb-1">
<u>Higlighted short answer.</u> And some kind of detailed list.
</p>
<ul>
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
</ul>
</div>
<div>
<p className="mb-1">
<strong>Short question?</strong>
</p>
<p className="mb-1">
<u>Higlighted short answer.</u>
</p>
<p className="mb-1">
Second part of the answer with more details.
</p>
<p>
Final part of the answer full of detais and Lorem ipsum dolor
sit amet consectetur adipisicing elit.
</p>
</div>
<div>
<p className="mb-1">
<strong>
The longest question in this faq. Made up of two sentences in
order to span to the next line?
</strong>
</p>
<p className="mb-1">
<u>Higlighted short answer.</u>
</p>
<p className="mb-1">
Second part of the answer with more details.
</p>
<p>
Final part of the answer full of detais and Lorem ipsum dolor
sit amet consectetur adipisicing elit.
</p>
</div>
<div>
<p className="mb-1">
<strong>Slightly longer question?</strong>
</p>
<p className="mb-1">
<u>Higlighted short answer.</u>
</p>
<p className="mb-1">
Second part of the answer with more details.
</p>
<p>
Final part of the answer full of detais and Lorem ipsum dolor
sit amet consectetur adipisicing elit.
</p>
</div>
</MDBCol>
<MDBCol lg="6" md="12" className="text-center">
<p>
<span class="fw-bold">
Still have any questions? Contact us to get your answer!
</span>
</p>
<form>
<MDBInput label="Email address" required className="mb-4" />
<MDBTextArea rows={4} label="Message" className="mb-4" />
<MDBBtn block>Send</MDBBtn>
</form>
</MDBCol>
</MDBRow>
</section>
</MDBContainer>
);
}
Customized collapse FAQ
By using the combination of the collapse functionality, typography, quotes, or other features you can customize your FAQ with limitations.
FAQ with short answers visible
Question 1
Short & concise version of the answer.
Learn moreQuestion 2
Short & concise version of the answer.
Learn moreQuestion 3
Short & concise version of the answer.
Learn more
import React, { useState } from "react";
import {
MDBCollapse,
MDBContainer,
MDBListGroup,
MDBListGroupItem,
MDBTypography,
} from "mdb-react-ui-kit";
export default function App() {
const [collapse1, setCollapse1] = useState(false);
const [collapse2, setCollapse2] = useState(false);
const [collapse3, setCollapse3] = useState(false);
const toggleCollapse1 = () => setCollapse1(!collapse1);
const toggleCollapse2 = () => setCollapse2(!collapse2);
const toggleCollapse3 = () => setCollapse3(!collapse3);
return (
<MDBContainer className="mt-5" style={{ maxWidth: "1000px" }}>
<MDBListGroup>
<MDBListGroupItem tag="a" href="#" onClick={toggleCollapse1} action>
<MDBTypography tag="h5">Question 1</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse1}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem tag="a" href="#" onClick={toggleCollapse2} action>
<MDBTypography tag="h5">Question 2</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse2}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem tag="a" href="#" onClick={toggleCollapse3} action>
<MDBTypography tag="h5">Question 3</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse3}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
</MDBListGroup>
</MDBContainer>
);
}
FAQ style options
Disabled
Question 1
Short & concise version of the answer.
Learn moreDisabled answer
This answer is disabled
Question 3
Short & concise version of the answer.
Learn moreHighlighted
Question 1
Short & concise version of the answer.
Learn moreHighlighted question?
Short & concise version of the answer.
Learn moreQuestion 3
Short & concise version of the answer.
Learn moreWith small icons
Question 1
Short & concise version of the answer.
Learn moreQuestion 2
Short & concise version of the answer.
Learn moreQuestion 3
Short & concise version of the answer.
Learn moreWith large icons
Question about price?
Short & concise version of the answer.
Learn moreQuestion about technical support?
Short & concise version of the answer.
Learn moreQuestion about dragons?
Short & concise version of the answer.
Learn more
import React, { useState } from "react";
import {
MDBCol,
MDBCollapse,
MDBContainer,
MDBIcon,
MDBListGroup,
MDBListGroupItem,
MDBRow,
MDBTypography,
} from "mdb-react-ui-kit";
export default function StyleOptions() {
const [collapse1, setCollapse1] = useState(false);
const [collapse2, setCollapse2] = useState(false);
const [collapse3, setCollapse3] = useState(false);
const [collapse4, setCollapse4] = useState(false);
const [collapse5, setCollapse5] = useState(false);
const [collapse6, setCollapse6] = useState(false);
const [collapse7, setCollapse7] = useState(false);
const [collapse8, setCollapse8] = useState(false);
const [collapse9, setCollapse9] = useState(false);
const [collapse10, setCollapse10] = useState(false);
const [collapse11, setCollapse11] = useState(false);
const [collapse12, setCollapse12] = useState(false);
const toggleCollapse = (callback) => callback((prev) => !prev);
return (
<MDBContainer className="mt-5" style={{ maxWidth: "1000px" }}>
<p className="mb-1">Disabled</p>
<MDBListGroup>
<MDBListGroupItem
tag="a"
href="#"
onClick={() => toggleCollapse(setCollapse1)}
action
>
<MDBTypography tag="h5">Question 1</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse1}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem tag="a" href="#" action disabled>
<MDBTypography tag="h5">Disabled answer</MDBTypography>
<p className="mb-1">This answer is disabled</p>
<MDBCollapse show={collapse2}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem
tag="a"
href="#"
onClick={() => toggleCollapse(setCollapse3)}
action
>
<MDBTypography tag="h5">Question 3</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse3}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
</MDBListGroup>
<p className="mb-1 mt-3">Highlighted</p>
<MDBListGroup>
<MDBListGroupItem
tag="a"
href="#"
onClick={() => toggleCollapse(setCollapse4)}
action
>
<MDBTypography tag="h5">Question 1</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse4}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem
tag="a"
href="#"
action
active
onClick={() => toggleCollapse(setCollapse5)}
>
<MDBTypography tag="h5">Highlighted question?</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small className=" text-white">
<u>Learn more</u>
</small>
<MDBCollapse show={collapse5}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem
tag="a"
href="#"
action
onClick={() => toggleCollapse(setCollapse6)}
>
<MDBTypography tag="h5">Question 3</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse6}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
</MDBListGroup>
<p className="mb-1 mt-3">With small icons</p>
<MDBListGroup>
<MDBListGroupItem
tag="a"
onClick={() => toggleCollapse(setCollapse7)}
action
>
<MDBTypography tag="h5">
<MDBIcon fas icon="question me-2" />
Question 1
</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse7}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem
tag="a"
action
onClick={() => toggleCollapse(setCollapse8)}
>
<MDBTypography tag="h5">
<MDBIcon fas icon="question-circle me-2" />
Question 2
</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse8}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
<MDBListGroupItem
tag="a"
action
onClick={() => toggleCollapse(setCollapse9)}
>
<MDBTypography tag="h5">
<MDBIcon far icon="question-circle me-2" />
Question 3
</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse9}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry richardson ad
squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBListGroupItem>
</MDBListGroup>
<p className="mb-1 mt-3">With large icons</p>
<MDBListGroup>
<MDBListGroupItem
tag="a"
onClick={() => toggleCollapse(setCollapse10)}
action
>
<div className="d-flex w-100 justify-content-between">
<MDBRow className="w-100">
<MDBCol
size="1"
className="text-center d-flex align-items-center"
>
<MDBIcon fas icon="money-bill me-2" size="3x" />
</MDBCol>
<MDBCol size="10">
<MDBTypography tag="h5">Question about price?</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse10}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry
richardson ad squid. Nihil anim keffiyeh helvetica, craft beer
labore wes anderson cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBCol>
</MDBRow>
</div>
</MDBListGroupItem>
<MDBListGroupItem
tag="a"
onClick={() => toggleCollapse(setCollapse11)}
action
>
<div className="d-flex w-100 justify-content-between">
<MDBRow className="w-100">
<MDBCol
size="1"
className="text-center d-flex align-items-center"
>
<MDBIcon fas icon="user-cog me-2" size="3x" />
</MDBCol>
<MDBCol size="10">
<MDBTypography tag="h5">Question about technical support?</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse11}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry
richardson ad squid. Nihil anim keffiyeh helvetica, craft beer
labore wes anderson cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBCol>
</MDBRow>
</div>
</MDBListGroupItem>
<MDBListGroupItem
tag="a"
onClick={() => toggleCollapse(setCollapse12)}
action
>
<div className="d-flex w-100 justify-content-between">
<MDBRow className="w-100">
<MDBCol
size="1"
className="text-center d-flex align-items-center"
>
<MDBIcon fas icon="dragon me-2" size="3x" />
</MDBCol>
<MDBCol size="10">
<MDBTypography tag="h5">Question about dragons?</MDBTypography>
<p className="mb-1">Short & concise version of the answer.</p>
<small>
<u>Learn more</u>
</small>
<MDBCollapse show={collapse12}>
Detailed and comprehensive answer goes here. pariatur cliche
reprehenderit, enim eiusmod high life accusamus terry
richardson ad squid. Nihil anim keffiyeh helvetica, craft beer
labore wes anderson cred nesciunt sapiente ea proident.
</MDBCollapse>
</MDBCol>
</MDBRow>
</div>
</MDBListGroupItem>
</MDBListGroup>
</MDBContainer>
);
}