question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make slider thumb label always visible

See original GitHub issue

Bug, feature request, or proposal:

Feature request

What is the expected behaviour?

I would like the thumb label to remain visible, not just when the slider is being changed.

What is the current behaviour?

The slider thumb label will only show when the slider is being moved.

https://material.angular.io/components/component/slider

What is the use-case or motivation for changing an existing behaviour?

I don’t think existing behaviour should be changed, but maybe an input can be given to <md-slider> which tells it whether to always display the thumb label.

From a design point of view, it is nice to be able to let the user know what the current value is for the slider.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

TypeScript 2.3.3 Angular 4.1.3 Angular Material 2.0.0-beta.5

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

24reactions
willshowellcommented, May 26, 2017

@michaelpwilson you can override it with css for now if you wish

.mat-slider-thumb-label {
  transform: rotate(45deg) !important;
  border-radius: 50% 50% 0 !important;
}

.mat-slider-thumb {
  transform: scale(0) !important;
}

.mat-slider-thumb-label-text {
  opacity: 1 !important;
}
11reactions
eroakcommented, Oct 7, 2017

@CDMU You should try to wrap the @michaelpwilson method with : ::ng-deep { }

::ng-deep {

  .mat-slider-thumb-label {
    transform: rotate(45deg) !important;
    border-radius: 50% 50% 0 !important;
  }
  
  .mat-slider-thumb {
    transform: scale(0) !important;
  }
  
  .mat-slider-thumb-label-text {
    opacity: 1 !important;
  }

}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I display thumb label all the time for material slider?
I want to let thumb label to display all ...
Read more >
Slider - Angular Material
By default, the value in the slider's thumb label will be the same as the model value, however this may end up being...
Read more >
Angular Material Slider - Javatpoint
Thumb label. The selected value of the slider is not visible to the user. But adding the value to the Thumb Lab attribute...
Read more >
Slider component — Vuetify.js
Show thumb label. If true it shows label when using slider. If set to 'always' it always shows label.
Read more >
Angular Material Slider - ConcretePage.com
The thumbLabel is boolean value. If the value is true, thumb label is shown. If this attribute is absent, the default value is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found