I am interested in enhancing the appearance of an Ionic 2 range element by adding labels throughout, similar to a progress bar. While I have successfully added labels at the beginning and end, I would like to explore placing labels dynamically on either side as well (Documentation: http://ionicframework.com/docs/v2/api/components/range/Range/)
My current approach involves creating an ion-row above the range and using CSS for positioning.
Incorporating Labels:
<div class='timeline'>
<ion-grid class="timeline-grid">
<ion-row class="timeline-labels">
<ion-col width-20>Label One</ion-col>
<ion-col width-20>Label Two</ion-col>
<ion-col width-20>Label Three</ion-col>
<ion-col width-20>Label Four</ion-col>
<ion-col width-20>Label Five</ion-col>
</ion-row>
<ion-row>
<ion-col>
<ion-item>
<ion-range color='secondary' [(ngModel)]="progress">
</ion-range>
</ion-item>
</ion-col>
</ion-row>
</ion-grid>
</div>
CSS Styling:
ion-row.timeline-labels {
padding-left: 20px;
z-index: 1;
position: absolute;
top: 10px;
}
Although my current method is functional, I believe there might be alternative or more efficient ways to achieve this design enhancement. Any suggestions or advice will be highly appreciated. Thank you!