The best way to generate buttons and apply visibility restrictions based on roles I want to generate about 40 buttons on the same page, every button should be visible to only a certain group of people based on their Drupal roles.

What the best way to do it ? I thought about creating a bloc for every button but to display them with visibility restriction in the Block layout and restrict every bloc by role..but it's not very efficient and the Block layout page will be full of those blocs.

Does anyone have any suggestions ?

Thank you
you can simply create different class for each type color and based on the role you can add the class to the button.