Question

I'm migrating an old module to Magento 2.4 and I would like to use the native classes from the Magento UI library to replace my Bootstrap classes.

What classes should I use to make my links look like buttons? I've read the Magento UI doc (lib/web/css/docs) but I can't figure out which class names I should be using. The original bootstrap style link is here:

<a href="#" target="_blank"class="btn btn-secondary btn-sm btn-recrutement btn-candidature">Text</a>

I've just found: https://github.com/magento/magento2/blob/2.4/lib/web/css/source/lib/_buttons.less but so far, no luck.

Was it helpful?

Solution

Use these two classes in your anchor tag

  <a href="#" class="action primary">Text</a>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top