As the example from shinyWidgets' documentation shows, I can define my own subtext labels, that show next to the main label. Is it possible for these subtexts to be aligned to the right, so that all main labels are aligned to left, and subtexts are aligned to right?
A simplified version of example from documentation (in link select pickerInput, the example is called 'Subtext'):
pickerInput(
inputId = "Id093",
label = "Subtext",
choices = rownames(mtcars[1:3,]),
choicesOpt = list(
subtext = paste("mpg",
mtcars[1:3,]$mpg,
sep = ": "
)
)
)
Generates following html text:
<div class="form-group shiny-input-container">
<label class="control-label" for="Id093">Subtext</label>
<select id="Id093" class="selectpicker form-control">
<option value="Mazda RX4" data-subtext="mpg: 21">Mazda RX4</option>
<option value="Mazda RX4 Wag" data-subtext="mpg: 21">Mazda RX4 Wag</option>
<option value="Datsun 710" data-subtext="mpg: 22.8">Datsun 710</option>
</select>
</div>
Also attaching image, as it is always better to work with one: list with subtext next to label
I have tried fiddling with css properties (like align-text) using Inspector in Chrome, but there is no luck.