angular / angular/components

feat(Slider): The Slider component should be able to properly display values with four or more digits

Open
#33,606 1 comment 0 reactions 0 assignees View on GitHub
area: material/slider feature P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### Feature Description

The [Slider component](https://material.angular.dev/components/slider/overview) cannot display values with four or more digits properly in the thumb label.

The issue can be quickly seen by sliding one of the example sliders in the documentation all the way up:

Image

At four digits, the text already overflows the container. A year looks even worse:

Image

While the custom thumb label formatting feature slightly helps with this, the limit for a slider that looks decent is just three-digit values.

Looking at [Material Design sliders](https://m3.material.io/components/sliders/overview), I can see that the thumb label is much wider, and it's easy to imagine it expanding horizontally to accomodate more text:

Image

The design of the Angular Material slider actually resembles the older M2 design with the smaller label:

Image

### Use Case

This will enable the slider to be used for a lot of common use cases like selecting a date range.

Contributor guide

Open the contributing guide

Research direction

Start with the Slider component and the example sliders in the documentation linked in the issue, reproducing the overflow with four-digit values and a year. Compare the thumb-label behavior with the Material Design slider reference; done means longer values display cleanly without overflowing and the documented examples remain usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
design, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.