Skip to Content

Collapse

Simple expand / collapse component with animations via framer-motion.

Examples

Custom Animation

Define custom animations for the collapse, using the animation, animationViewChange props:

Learn more about how to customize the animations in the Custom Animations section.

API

NameTypeDefault
expandedboolean

Whether the collapse is expanded or not.

animatedboolean

Deprecated: Use animation configuration instead. Whether the collapse is animated or not.

true
animationMotionNodeAnimationOptions

Animation configuration for the collapse.

childrenReactNode | (() => ReactNode)

Children to render.

themeCollapseTheme

Theme for the Collapse.

Last updated on