[accordion] Support scroll into view
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
# Feature Request
## Summary
* When an accordion item is opened, if it is not fully visible in the viewport, it should automatically scroll into view.
* The scroll behavior should be smooth and should not disrupt the user experience.
---
## Examples in other libraries
* Native `scrollIntoView({ behavior: "smooth" })`
## Motivation
In long pages or scrollable containers, users may expand an accordion that is partially or completely outside the viewport. This leads to poor UX, as the user might not see the opened content immediately.
Automatically scrolling the expanded accordion into view improves usability and ensures that the user’s focus stays on the interacted content.
Contributor guide
Assessment
This issue has not been assessed yet.