I want to add <button> tag in Rendering Variants tag list so that my link renders as <button> and NOT as <a href>

When I manually add the button tag in the enum list path (which I don't prefer): /sitecore/system/Settings/Foundation/Experience Accelerator/Rendering Variants/Enums/Tags

I get the rendered variant with button as empty

enter image description here


enter image description here

Is there anyway to render just <button> along with all the properties?

  • 1
    What properties do you want on the button? and why do you want a link rendered as a button. Semantically, if the click changes navigation, it should be an a tag.
    – Richard Seal
    Feb 25 '20 at 15:42
  • Hello @RichardSeal our design team has defined a separate css class each for <button> and <a> tag. But we are trying to resolve this issue. Was also curious to know if we can add some HTML5 elements to the tag list (if required) Feb 26 '20 at 13:02
  • Why not just add the btn css classes to the A tag in your rendering variant. It would look the same and behave properly
    – Richard Seal
    Feb 26 '20 at 14:08

Your Answer

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

Browse other questions tagged or ask your own question.