indent options in shiny's selectInput()

RoyalTS Source

I would like to indent some of the options in a shiny selectInput() with extra spaces on the left of the names of the choices. However, all spaces in

selectInput("city_name",  "City", choices = "         Berlin")

are ignored and the  s in

selectInput("city_name",  "City", choices = "   Berlin")

get sanitized away.



answered 2 years ago RoyalTS #1

This isn't for the faint of heart but there are a bunch of unicode characters that are spaces of varying width (see here) that work just fine when used instead of regular spaces.

comments powered by Disqus