Make a shape linkable

Hi! I’ve been trying to read up on this and try my hand at the codes, but nothing seems to work. I have a page with multiple boxes and I need to make the entire box essentially a button to an internal page (each box links to a different page).
I can’t just make them all buttons because I need more space for text and flexibility with the fonts- each box has a heading and then a descriptor.
I have added a button to the box, but users don’t seem to click on the link, rather just the box itself.
I tried repeater boxes, but some of the boxes are styled slightly different, so those didn’t work either (and I need to be able to place them on the page rather than having them automatically line up).
I keep reading the guides and it seems like it should be easy using OnClick and Link but I’m writing something wrong with the code. It says that the .link isn’t available for boxes.
I found one similar question, and the code provided worked for one box, but once I added more to the page, it didn’t work.
Can anyone help me with what the code should look like? Thanks!

If the LINK is not available, use wixLocation.to() in the click event.

Like MVVeiga already mentioned you can use wixLocation.to() to solve your problem.

https://www.wix.com/velo/reference/wix-location

https://www.wix.com/velo/reference/wix-location/to

Somethink like this…

import wixLocation from 'wix-location';

$w.onReady(()=>{
    $w('#YourButtonIDhere').onClick(()=>{
        wixLocation.to("http://wix.com");
    })
})

Also take alook here for more examples…
https://russian-dima.wixsite.com/meinewebsite/website-navigation

You are correct, that the Box element doesn’t have a .link property. Instead. you need to add an onClick() event handler for each box. Then, as suggested in the other comments, use wix-location.to() to perform the redirect.