Accordion
Vertically stacked list of headers that can be clicked to reveal or hide content associated with them.
Basic example
This is the first item's accordion body. 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 .accordion-body, though the transition does limit overflow.
This is the second item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
This is the third item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
import Accordion from 'react-bootstrap/Accordion'
import AccordionItem from 'react-bootstrap/AccordionItem'
import AccordionHeader from 'react-bootstrap/AccordionHeader'
import AccordionBody from 'react-bootstrap/AccordionBody'
export default function AccordionBasicDemo() {
return (
<Accordion defaultActiveKey="0">
<AccordionItem eventKey="0">
<AccordionHeader as="h3" className="animate-underline">
<span className="animate-target me-2">Accordion Item #1</span>
</AccordionHeader>
<AccordionBody>
This is the first item's accordion body. 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 .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="1">
<AccordionHeader as="h3" className="animate-underline">
<span className="animate-target me-2">Accordion Item #2</span>
</AccordionHeader>
<AccordionBody>
This is the second item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="2" className="animate-underline">
<AccordionHeader as="h3">
<span className="animate-target me-2">Accordion Item #3</span>
</AccordionHeader>
<AccordionBody>
This is the third item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
</Accordion>
)
}
Alternative button icon
import Accordion from 'react-bootstrap/Accordion'
import AccordionItem from 'react-bootstrap/AccordionItem'
import AccordionHeader from 'react-bootstrap/AccordionHeader'
import AccordionBody from 'react-bootstrap/AccordionBody'
export default function AccordionAltButtonIconDemo() {
return (
<Accordion defaultActiveKey="0" className="accordion-alt-icon">
<AccordionItem eventKey="0">
<AccordionHeader as="h3" className="animate-underline">
<span className="animate-target me-2">Accordion Item #1</span>
</AccordionHeader>
<AccordionBody>
This is the first item's accordion body. 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 .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="1">
<AccordionHeader as="h3" className="animate-underline">
<span className="animate-target me-2">Accordion Item #2</span>
</AccordionHeader>
<AccordionBody>
This is the second item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="2" className="animate-underline">
<AccordionHeader as="h3">
<span className="animate-target me-2">Accordion Item #3</span>
</AccordionHeader>
<AccordionBody>
This is the third item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
</Accordion>
)
}
Alternative button icon
This is the first item's accordion body. 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 .accordion-body, though the transition does limit overflow.
This is the second item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
This is the third item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
import Accordion from 'react-bootstrap/Accordion'
import AccordionItem from 'react-bootstrap/AccordionItem'
import AccordionHeader from 'react-bootstrap/AccordionHeader'
import AccordionBody from 'react-bootstrap/AccordionBody'
export default function AccordionWithIconsDemo() {
return (
<Accordion defaultActiveKey="0">
<AccordionItem eventKey="0">
<AccordionHeader as="h3" className="animate-underline">
<i className="ci-bell fs-lg pe-1 me-2"/>
<span className="animate-target me-2">Accordion Item #1</span>
</AccordionHeader>
<AccordionBody>
This is the first item's accordion body. 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 .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="1">
<AccordionHeader as="h3" className="animate-underline">
<i className="ci-edit fs-lg pe-1 me-2"/>
<span className="animate-target me-2">Accordion Item #2</span>
</AccordionHeader>
<AccordionBody>
This is the second item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="2" className="animate-underline">
<AccordionHeader as="h3">
<i className="ci-lock fs-lg pe-1 me-2"/>
<span className="animate-target me-2">Accordion Item #3</span>
</AccordionHeader>
<AccordionBody>
This is the third item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
</Accordion>
)
}
Sizing
Accordion Item #1
This is the first item's accordion body. 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 .accordion-body, though the transition does limit overflow.
Accordion Item #2
This is the second item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
Accordion Item #3
This is the third item's accordion body. 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. Its also worth noting that just about any HTML can go within the .accordion-body, though the transition does limit overflow.
import Accordion from 'react-bootstrap/Accordion'
import AccordionItem from 'react-bootstrap/AccordionItem'
import AccordionButton from 'react-bootstrap/AccordionButton'
import AccordionBody from 'react-bootstrap/AccordionBody'
export default function AccordionSizingDemo () {
return (
<Accordion defaultActiveKey="0">
<AccordionItem eventKey="0">
<AccordionButton as="h3" className="animate-underline fs-5 cursor-pointer mb-0">
<span className="animate-target me-2">Accordion Item #1</span>
</AccordionButton>
<AccordionBody className="fs-base">
This is the first item's accordion body. 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
.accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="1">
<AccordionButton as="h3" className="animate-underline fs-5 cursor-pointer mb-0">
<span className="animate-target me-2">Accordion Item #2</span>
</AccordionButton>
<AccordionBody className="fs-base">
This is the second item's accordion body. 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. Its also worth noting that just about any HTML can go within the
.accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
<AccordionItem eventKey="2">
<AccordionButton as="h3" className="animate-underline fs-5 cursor-pointer mb-0">
<span className="animate-target me-2">Accordion Item #3</span>
</AccordionButton>
<AccordionBody className="fs-base">
This is the third item's accordion body. 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. Its also worth noting that just about any HTML can go within the
.accordion-body, though the transition does limit overflow.
</AccordionBody>
</AccordionItem>
</Accordion>
)
}