A button that smoothly transitions between collapsed and expanded states using spring animations. Shows only an icon when collapsed and reveals text alongside the icon when expanded, perfect for responsive layouts and space-saving interfaces.
Installation
Usage
import {ExpandableButton} from '@/components/molecule-ui/expandable-button'
<ExpandableButton />
Examples
Expandable Button Group
Props
Prop | Type | Default |
---|---|---|
icon? | ReactNode | - |
onExpandedChange? | ((open: boolean) => void) | - |
expanded? | boolean | - |