<a>
element with a <bolt-link>
element. Common HTML attributes such as href
and target
placed on the <a>
would work as expected.
<bolt-link>
<a href="https://pega.com" target="_blank">This is a link</a>
</bolt-link>
<bolt-icon>
tag. Inline links will show the white-space added by line breaks, so removing them is necessary to eliminate unwanted space.
This is an
<p>This is an <bolt-link><a href="https://pega.com">inline link</a></bolt-link>, and this is an <bolt-link><a href="https://pega.com"><span slot="after"><!-- Icon or image markup --></span>inline link with an icon</a></bolt-link>. Inline links are truly inline, which means the text can wrap to a second line and the icon falls on the baseline either before or after the text.</p>
<bolt-link>
, place a <bolt-icon>
next to your link text. For icons to have the correct spacing, you must add the slot
attribute to <bolt-icon>
. The slot
value can be before
or after
.
<p>
<bolt-link><a href="https://pega.com"><span slot="before"><!-- Icon or image markup --></span>This is a link with icon</a></bolt-link>
</p>
<p>
<bolt-link><a href="https://pega.com">This is a link with icon<span slot="after"><!-- Icon or image markup --></span></a></bolt-link>
</p>