1

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.

1 Answer 1

1

Use these two classes in your anchor tag

  <a href="#" class="action primary">Text</a>
2
  • Thank you so much! Would you mind explaining where you found which classes to apply?
    – Puka
    Commented Apr 16, 2021 at 9:37
  • 1
    Simply inspect any button in magento website and see what classes are applied to that button, you can find it easily Commented Apr 16, 2021 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.