Toggle button
If you want to group multiple functions (usually 2 or 3) into a single button while keeping all of them visible, toggle buttons are the answer. They always live in groups, sharing a single container. In each group, only one button can be selected at a time.[1]
Pro Tip: Make sure to clearly convey which option is selected using colors or overlays.