Polaris TextField - Responsive Label Behavior (Similar to Shopify Admin Panel)

In the Shopify Admin Panel, text field labels shift from outside to inside the input on smaller screens. I tried replicating this with Polaris TextField, but couldn’t achieve the same effect using available props.

Is there a way to make TextField labels responsive like this, or does it require custom implementation?

For reference, I’ve attached a video demonstrating the exact behavior I’m trying to achieve.

textfield

Any guidance or insights would be greatly appreciated!