Polaris Web Components (position: relative, absolute, fixed)

Please add the ability to add position: relative | absolute | fixed | sticky to components and set the overflow: visible | hidden to more elements.

Can you share an explanation of what you are trying to build? This is a lot of flexibility and could break the merchants user experience if misused.

Maybe there is a way we can support the user experience you are building in another way?

I’m just trying to replicate what is on Shopify homepage.

These are some examples:

Overflow: Scroll

Toggle Dropdown
For the dropdown content to work, we need to set position absolute and position relative on the parent element.

Tooltip hint
Position absolute/relative is also required to build this.

Thank you!

We are currently working on Popover and Tooltip which will resolve a lot of these issues for you. Once those ship let me know if you still need this flexibility.

2 Likes

Thank you very much!

Maybe overflow: scroll could give us more flexibility on creating a layout like this.

In the Shopify version the selected date-rage as an active class. Is there a way to have an active class for the button and set the icon on the right side? Or should I try to use <s-clickable> with to recreate a similar layout?

Shopify homepage

Polaris Web Components

I’m attaching another example of active class.

Is there a way to make a button active like in the following screenshot?

default-state

Thank you so much!

Hey @alex-page,

The original Shopify table element has `overflow: scroll` and allow sticky position for the action buttons.

Is there a preferred way to replicate this using the web components?

Thank you!

1 Like