The Collapsible component is used to create a collapsible section that can expand or collapse to show or hide its content.

This is basically like a Accordion component.

Props

PropTypeDescription
childrenReact.ReactNodeThe child components to be rendered inside the collapsible section.
titlestringThe title of the collapsible section that triggers the expand/collapse.

Usage Example

import { Collapsible } from '@/components/common/Collapsible';
const App = () => {
  return (
    <Collapsible title="Click to Expand">
        <ThemedText>This is the content that can be collapsed.</ThemedText>
    </Collapsible>
  );
};