material-components / material-components/material-components-android
[ChipGroup] Chip overflow indicator
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Currently the `ChipGroup` supports the `singleLine` attribute with a `HorizontalScrollView` so that the chips will always fit in a scrollable list. Unfortunately for some use cases this behavior is not really nice.
For example if you have a list of filters that can be selected on an extra screen and will be displayed in a single line `ChipGroup` somewhere on the main screen. The user wouldn't really profit from a scrollable single line that will only support viewing the filters. Instead the ChipGroup should display all items till it reaches its space limit and display an indicator (like "...") that lets the user know that there are more filters set.
I'm trying to get this by calculating the container width and the childrens width to decide which chips to remove but it would be nice to have an overflow behavior attribute as a feature that will automatically do this by itself.
It could look like:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting ChipGroup's singleLine behavior and its use of HorizontalScrollView. Define the overflow attribute and indicator behavior so chips stop at the available width while indicating additional filters; done means the requested single-line overflow presentation works without relying on manual width calculations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100