UXP spectrum label position, size

Hi,

I’m looking for an example of how to add the position “side” and size “extra-large” options to a spectrum label similar to this example:

<sp-label isrequired="true" slot="label">Phone Number</sp-label>

I tried adding labelposition and size attributes to the sp-textfield element and to the sp-label element, but neither worked.

Thanks!

Hopefully someone else can chime in about the side attribute, but the documentation for <sp-heading> shows you how to set the size, which also works for <sp-label>'s:

<sp-heading size="XXXL">Heading XXXL</sp-heading>
<sp-heading size="XXL">Heading XXL</sp-heading>
<sp-heading size="XL">Heading XL</sp-heading>
<sp-heading size="L">Heading L</sp-heading>
<sp-heading size="M">Heading M</sp-heading>
<sp-heading size="S">Heading S</sp-heading>
<sp-heading size="XS">Heading XS</sp-heading>
<sp-heading size="XXS">Heading XXS</sp-heading>

Source: https://developer.adobe.com/xd/uxp/uxp/reference-spectrum/Typography/sp-heading/

Thanks.

This document:
https://developer.adobe.com/xd/uxp/uxp/reference-spectrum/User%20Interface/sp-textfield/

links to this document:

which states that the size option values are “small / medium / large / extra-large”:

I wasn’t able to get either XL or extra-large to work on a label.

I also wasn’t able to find any examples of the label position option in use.

Thanks again.