mui / mui/base-ui

[accordion] Support scroll into view

Open
#4,173 2 comments 1 reaction 0 assignees View on GitHub
component: accordion has workaround type: new feature
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.