Checkout UI Extension position absolute on View component to overlay page

Gregles
Shopify Partner
13 0 0

Can someone help me understand how the position absolute attribute on a view component works.

 

My goal is to make the view sit over other elements on the page. By default the position is relative, but according the docs it should allow absolute. But it's not.

 

const resultBlock = root.createComponent(
    View,
    {
      display:  'block',
      id:       'viewresult',
      position: "absolute",
      zIndex:   10000
    }
  );

 

Ideally I want that element to overlay others on the page (and shift it down 4px).

 

Thanks in advance for any pointers you have.

 

Greg

Reply 1 (1)

Gregles
Shopify Partner
13 0 0

I forgot to include the front-end output which shows it as position relative:

Screen Shot 2024-05-19 at 6.00.19 pm.png


There's no compile errors. It's just not working.