ExpandableCode Component

A reusable React component for collapsible code blocks with smooth animations

Dark Theme (Default)

Light Theme with Line Numbers

Usage

// Import the component
import
ExpandableCode
from
'./ExpandableCode'

// Use in your component
<ExpandableCode

htmlContent={yourHtmlString}
maxHeight={300}
maxLines={15}
theme="dark"
showLineNumbers={true}
className="custom-class"
/>