Change size of Icon Polaris

jim27
Shopify Partner
11 0 1

Is it possible to change the height and width of an Icon in shopify's Polaris? If so, can you show me how?

0 Likes
KarlOffenberger
Shopify Partner
1866 184 826

Hi Jim,

Not that I am aware of. I do not think Polaris was intended as a general use, generic UI framework where having such properties would make sense. Because Polaris is specifically for Shopify internal usage and Shopify app developers, it makes more sense to keep a uniform look and feel, design language system, where icons and their size are part of these constraints.

This section of the design guidelines has more info on that.

Greetings!

Liked this post? You might also like our fantastic upsell apps Candy Rack, Last Upsell post-purchase and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
dgtlmonk
Excursionist
13 1 0

Wrap the component in a span with style like so:

<span style={{ width: "16px", height: "16px" }}>
  <Icon source={QuestionMarkMajor} color="base" />
</span>
0 Likes