It is possible to add a <button> tag into the p-tag component. If you do this, the entire component becomes
clickable and no other content outside the button or link is allowed.
It is possible to add <a> tag into the p-tag component. If you do this, the entire component becomes clickable and
no other content outside the button or link is allowed.
The contents of the p-tag component are rendered with white-space: nowrap by default. If multiline rendering is
needed (e.g. due to less amount of space), the default behaviour can be overwritten with CSS from outside.
Some label with longer text wrapped in a narrow container
prev
next
Open in Stackblitz
<!doctype html>
<htmllang="en"class="auto"><head><title></title></head><bodyclass="bg-canvas"><divclass="w-[100px]"><p-tagvariant="success"class="whitespace-normal"> Some label with longer text wrapped in a narrow container
</p-tag></div><script></script></body></html>