Dynamic font size on checkout UI extension

Is there no way to change the font size dynamically to the device width?

In this documentation you can do changes dynamically:
https://shopify.dev/docs/api/checkout-ui-extensions/unstable/components/utilities/stylehelper#examples

But it doesnt work on the style property “size” on elements:
https://shopify.dev/docs/api/checkout-ui-extensions/unstable/components/titles-and-text/text

I read there is no support for this attribute “size”.
But why??, its such a easy but important feature for responsive Design!

On YouTube comment section someone said:
From Checkout UI Extensions the Text component has a size prop that supports some fixed values like “small”, “base” and “large”, but the type of that prop isn’t MaybeResponsiveConditionalStyle.

Hi Sello,

We currently don’t support conditional values for the size property on the Text component, but I’ve connected with the checkout product team who are looking at how best to support this in future updates.

1 Like