Skip to content

Content

Accordion

Bundle size
5.46 KB
3.0.1

A series of interactive titles stacked on top of each other, each one revealing a section of content.

This component is a slight expansion of the Accordion developed and maintained by Radix UI.

Terminal window
pnpm add @inpulse-ui/accordion

Contains all the parts of an accordion.

PropTypeDefault ValueRequired
typeenumNo
valuestring-No
defaultValuestring-No
onValueChangefunction-No
collapsiblebooleanfalseNo
disabledbooleanfalseNo
direnumNo
orientationenumNo

Contains all the parts of a collapsible section.

PropTypeDefault ValueRequired
disabledbooleanfalseNo
valuestring-Yes

Toggles the collapsed state of its associated item.

PropTypeDefault ValueRequired
asChildbooleanfalseNo
useUnderlinebooleantrueNo

Contains the collapsible content for an item.

PropTypeDefault ValueRequired
asChildbooleanfalseNo
forceMountboolean-No

Wrap all accordion items with the Accordion component. Each item should be wrapped in an AccordionItem, which contains a AccordionTrigger and a AccordionContent.

<Accordion>
<AccordionItem value="item">
<AccordionTrigger>Item title</AccordionTrigger>
<AccordionContent>
Item content.
</AccordionContent>
</AccordionItem>
</Accordion>

Use the collapsible prop to allow all items to be collapsed.

Set the type property to multiple to allow opening multiple items at the same time.

Use the defaultValue property to define which items should be expanded by default.

Yes. It's unstyled by default, giving you freedom over the look and feel.

Through the useUnderline prop, it is possible to remove the underline from the trigger.

Project

Built with by Jo Santana in Brazil.

© 2026 Inpulse. All rights reserved.