An efficient way of implementing buttons

Hello I am trying to make this interface as shown in the attached picture.

Is there any efficient way of implementing this. If you need more details about this plz let me know.