Accordion - Keep React

The Accordion component in the Keep React Library allows you to create collapsible sections of content, commonly referred to as accordions. These sections can be toggled open or closed by the user, offering a compact and intuitive way to display content. The Accordion is customizable, allowing you to configure its appearance, behavior, and interaction states.

Table of Contents#

Default Accordion#

The default Accordion component lets users expand and collapse sections by clicking on the header or button.

Flush Accordion#

The flush property removes the outer border and background color, giving the accordion a minimalistic, seamless look.

Default Open item#

If you need one or more accordion items to be open by default, use the defaultValue prop with the corresponding item's value property.

The Keep React is a collection of UI components, styles, and guidelines that ensure consistency and a unified user experience across our products. It simplifies the design and development process by providing ready-to-use components that can be easily customized and integrated into various applications.

Open Multiple Panel#

To allow multiple accordion items to be open at the same time, set the accordion's type prop to "multiple".

Disabled Accordion#

To prevent interaction with certain accordion, use the disabled property on specific Accordion components.

Accordion API Reference#

Explore the full range of props available for the Accordion component:

PropertyDescriptionTypeDefault
typeDetermines whether one or multiple items can be opened at the same time.
single
multiple
single
flushAccordion without outer border and and background colorbooleanfalse
disabledDisable interaction with the accordion.booleanfalse
collapsibleWhen type is "single", allows closing content when clicking trigger for an open item.booleantrue
defaultValueWhich panel will be open by default.stringNone

Item API Reference#

Learn about the properties available for individual Accordion items:

PropertyDescriptionTypeDefault
valueThis value connect to the contentstringNone
disabledDisable interaction with the accordion item.booleanfalse