Button for redirecting to url


so I have a button here that only clickable, but won’t redirect to URL. Any ideas? Thank you!

<button class="w-max h-min flex justify-center items-center px-3 py-2 bg-white text-tersiary rounded-xl"href="url here"@click="onclick">{{ btnText }}Button Text!</button>

>Solution :

If you’re using vue router you could do :

<button class="..." @click="$router.push(url here)">{{ btnText }}Button Text!</button>

Leave a ReplyCancel reply