Components / component

Smooth Accordion

An accordion whose panels open to their exact height without measuring, with a turning plus icon.

Smooth Accordion demo

Implementation

An accordion whose panels open to their exact height without measuring, with a turning plus icon.

Framework
React 19.3.1 with TypeScript
Motion
Native CSS and browser APIs. No GSAP required.
Available modes
build
Version
1.0.0 · published

Source code

Loading source…

Quality evidence

Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .

Changelog

v1.0.0 · An accordion whose panels open to their exact height without measuring, with a turning plus icon.

Frequently asked questions

How does it open to the exact height without measuring?

The panel animates a grid row from 0fr to 1fr. The browser works out the height of the content itself, so there is no script and no stale measurement.

Can several panels be open at once?

Yes. Pass multiple. By default opening one panel closes the others.