TheComputerM / svelte-materialify

A Material UI Design Component library for Svelte heavily inspired by vuetify.
https://svelte-materialify.vercel.app
MIT License
622 stars 84 forks source link

Generating href attribute #215

Open gjovanov opened 3 years ago

gjovanov commented 3 years ago

Hi there, how can we generate:

with a tag and href attribute?

I was able to handle only on:click + programmatic navigation, but for SEO-friendly pages, it would be useful to generate: <a href="...">

In Vuetify this is supported with either: to, href, nuxt component attributes.

Any plan for supporting it?

Thanks.

robsch commented 3 years ago

In a menu the ListItem can be surrounded with an a tag. Does this help? Just found that out myself.

<Menu hover>

    <div slot="activator">
        <Avatar>
            <Icon path={mdiAccountCircleOutline} />
        </Avatar>
    </div>

    <a href="/settings/company">
        <ListItem>COMPANY SETTINGS</ListItem>
    </a>
    <a href="/settings/account">
        <ListItem>ACCOUNT SETTINGS</ListItem>
    </a>

</Menu>