Question about changing the card in the dashboard

I have just used my broadlink rm remote controller to add an entity to my home assistant. But I have some problem when i’m adding a card into the dashboard. I don’t know how to turn the two “on” and “off” button to a toggle like the second one. I went to see the document about customizing entities but the document was not clear enough. Could someone help me with the problem, really appreciate.