How to add a badge in front of label in a Polaris TextField

Solved

How to add a badge in front of label in a Polaris TextField

wayforward
Shopify Partner
33 3 4

Hi,

 

I want to add a badge next to the label.

Any input on how to achieve that

wayforward_0-1719816729808.png

 

Accepted Solution (1)

wayforward
Shopify Partner
33 3 4

This is an accepted solution.

ok got it figured

label={<><Text as="strong">My label</Text><Badge tone="success">Active</Badge></>}

View solution in original post

Replies 6 (6)

ProtoMan44
Shopify Partner
495 43 80

@wayforward hey, thanks for posting here.

can you please let me know where is this place to add badges?

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!
wayforward
Shopify Partner
33 3 4

the highlighted yellow area next to label ( My label) of TextField

ProtoMan44
Shopify Partner
495 43 80

@wayforward oh , mate i just need to know where is it thing?

storefront or backend?

 

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!
wayforward
Shopify Partner
33 3 4

sorry, forgot to add - I am developing a Shopify app (jsx)

wayforward
Shopify Partner
33 3 4

I am developing a Shopify remix app (jsx) using polaris

wayforward
Shopify Partner
33 3 4

This is an accepted solution.

ok got it figured

label={<><Text as="strong">My label</Text><Badge tone="success">Active</Badge></>}