How to make a card a link?

#1

I’m planning on using this from my mobile mainly so I wanted a card on the home screen that goes to a page instead of using the smaller hamburger menu. Is there a way to make the whole card a link? I can only find info on adding a link to the bottom of the card (new-udcard -links), instead of the entire card.

0 Likes

#2

With the new link component you can make this.
Download the version from github or wait that adam will release a beta vesion

0 Likes

#3

Where do i find that info? I can’t find it on demo site or in docs. Is there somewhere else that i can find what included?

0 Likes

#4

BTW you can take a look in the link.tests.ps1 in github to see how to make card as link.
if its help you

0 Likes

#5

Hey @GarySmithPS without using the cool NEW stuff @AlonGvili has been cooking up you are limited. We will hopefully have that documented / putting out tutorials / training materials soon to get people up and running on the new material UI components!

Especially for mobile I could see building a “Tile based” navigation UI using these methods that would be a good experience!

For now on UD Cards you can can embed links but you don’t have as much flexibility, but here are some options that might work for you for now:

New-UDCard -Title "Card With Links" -Content {
        
        #UDLink
        New-UDLink -Text "This is a UD Link in a CARD Content" -Url "https://github.com"
        
        #HTML
        New-UDHtml -Markup '<a href="https://github.com">This is a UDHTML in CARD Content</a>'

        #BUTTON
        New-UDButton -Flat -Text "BUTTON In Card Content" -Icon fast_forward -OnClick {
            Invoke-UDRedirect -Url "https://github.com"
        }

    } -Links @(
        New-UDLink -Text "This is a UDLink in CARD LINKS" -Url "https://github.com"
    )

While the whole card is not a link there are at least some links in the card:

image

@artvandelay440 has also been doing some really cool ui work, that he has been nice enough to show off as well and give some examples:

0 Likes

#6

if you are using the new UDMuLink command you can just do this

        new-udmulink -Content {
            $card
        } -Id 'card-link' -url '#'         

and you have a card object as link .

give it a try

1 Like

#7

Hey @AlonGvili where can I download these from?

0 Likes

#8

Github or u can wait for adam to release the beta version

0 Likes

#9

Awesome, I guess I’ll wait :wink:

0 Likes

#10

the beta was released so you can try the new components

1 Like

#11

next silly question. How do i download the beta?

0 Likes

#12

All it should take to download the beta is this:

INSTALL-MODULE UNIVERSALDASHBOARD -ALLOWPRERELEASE -FORCE -AcceptLicense

The “-ALLOWPRERELEASE” is the key!

0 Likes

#13

OK. that was easier then I thought! I’ll try it out.
Ideally, I’m just trying to knock up a few things so I can show work the benefits and get them to buy the full edition so that I can have people sign in.

0 Likes