Make accordion default to closed

I’m using the markdown editor and the accordion defaults to being opened. Is there a way to change this to being closed by default?

You can use defaultOpen={false} to collapse the accordion by default.


Ohhh okay. The snippet from the markdown editor just has this

<Accordion title="Foobar" defaultOpen>
</Accordion>

Could the snippet be changed to show that the defaultOpen property takes a boolean? Like so

<Accordion title="Foobar" defaultOpen={true}>
</Accordion>

Yes, you can modify it in this way: defaultOpen={false} means it is collapsed by default, and defaultOpen={true} means it is expanded by default.