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

Use these two classes in your anchor tag

  <a href="#" class="action primary">Text</a>
3
  • Thank you so much! Would you mind explaining where you found which classes to apply? – Puka Apr 16 at 9:37
  • Is this solution working for you? Then please accept the solution – Arun Kumar Apr 16 at 9:38
  • 1
    Simply inspect any button in magento website and see what classes are applied to that button, you can find it easily – Arun Kumar Apr 16 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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