-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buttons that are links #31
Comments
Not the best way but you could do something like this: <a href="http://website.com">
<Button>Visit us!</Button>
</a> There is no way to to create a dynamic element (see sveltejs/svelte#2324).
|
Thanks @BogdanDarius, that worked perfectly. When dynamic elements will exist, I think that Smelte will make use of them for implementing button links. |
Thanks! Added in 0.1.6. Addind |
Great @matyunya ! I could use it here: https://jailbreak.frama.io/vitrine/ Just a quick note: if I pass
where it could have been:
|
I'd like to create a link to an URL, rendered as a button.
For now if I create a
<Button on:click={() => goto("https://.../")>
then the user will not be able to see the target of the link, disabling the possibility of doing ctrl-click to open in a new tab, etc.So I'd like to have a
<Button>
that would accept ahref
(orto
) property, and would be rendered as a<a href="..."
. I'd like also to setup atarget="_blank"
attribute if needed.Is this need doable with another approach? Is it something planned from your side @matyunya?
Related work in other libraries:
<Button>
accepts ato
property which generates linksThe text was updated successfully, but these errors were encountered: