Accordion
An interactive section that toggles the visibility of its content.
An Accordion lets users toggle the visibility of content. The content section
can be expanded to reveal details and collapsed to hide them, keeping
information organized and saving space. It is commonly used in FAQs, settings
panels, and documentation to present layered content efficiently.
import { Accordion } from '@workflowbuilder/ui';
function Example() { return ( <Accordion label="What is @workflowbuilder/ui?" defaultOpen> Our component library, built on Base UI. </Accordion> );}
Also accepts every standard <div> attribute (onChange, placeholder, aria-*, …); they are forwarded to the underlying element.
childrenrequiredContents of the collapsible section
labelrequiredText displayed in the header
defaultOpenInitial open state
iconIcon the component shows; `IconSwitch` shows it in the off state.
isOpenTrue if not collapsed
onToggleOpenCallback run when the open state changes
CSS variables
Section titled “CSS variables”This component does not expose its own CSS variables.