User Interface – Add Choice Bar (like Button Bar)

For many situations, it might be such a needed space-saving and logically grouped component.
I do CSS hack(Nth decoration) to do it like on the below screen, but it is completely unusable when some components above have conditional visibility as enumeration of items changes.