GuideWeb ComponentsMain ComponentAccordion

Accordion

The accordion component that allows users to expand and collapse content sections. It is commonly used to display a large amount of information in a compact space, making it easier for users to scan and consume content.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab
Content

Usage

import { Accordion } from 'bio-bind-ui';
    <Accordion
      items={[
        {
          title: 'Title',
          content: 'Content',
        },
      ]}
      style={{}}
      mode='light'
      id='accordion'
      variant='none'
      expandedIndexes=[]
      onExpandedIndexes={(expandedIndexes: number[]) => }
    />

Examples

Items

Use items to add content to the accordion

Use items to add content to the accordion

Style (optional)

Use style to custom accordion

Use items to add content to the accordion

Mode (optional)

Use mode to use dark or light

Use items to add content to the accordion

Variant (optional)

Use variant accordion

Use items to add content to the accordion

Props

PropsRequiredDefaultTypedescription
itemstrue[]Array<{ title: string, content: ReactNode }>The list of items containing a title and content for the accordion.
stylefalse-CSSPropertiesCustom styles for the accordion component.
modefalselightlight darkThe theme mode of the accordion (light or dark).
idfalse-stringA unique identifier for the accordion.
variantfalsenonenone border backgroundThe visual style variant of the accordion.
expandedIndexesfalse-number[]The indexes of the items to be expanded by default.
onExpandedIndexesfalse-(indexes: number[]) => voidCallback triggered when the expanded indexes change.
BIND © Biofarma Innovate Next-level Design .