What is the best way to specify "size" attribute for sp elements?

Maybe it doesn’t make a difference now, but I’ve seen and tried both capital and small letters used to specify the size attribute for sp elements like sp-button, sp-slider, etc. Example:

<sp-slider size="S" id="slider" min="0" max="255" value="128" ><sp-label slot="label"></sp-label> </sp-slider>

but the following also works:

<sp-slider size="s" id="slider" min="0" max="255" value="128" ><sp-label slot="label"></sp-label> </sp-slider>

So right now both capital and small letters work to specify “size” but what’s best looking forward? Is one preferred in order to future-proof the UI from breaking later on as UXP continues to evolve?

The attribute is case-insensitive.

If you want to match the Spectrum web components library, they use lowercase, and that would be my suggestion. If I had to guess the “S” you’re seeing might just be a slow SHIFT action, and since it doesn’t error, it’s not obviously caught. :slight_smile:

Thanks, @kerrishotts. Glad I asked. I thought I saw the capital letters in the KitchenSink plugin, but maybe it was an older version.