New-UDAvatar -Variant

Product: PowerShell Universal
Version: 2.4.1

Hey, Just trying to use New-UDAvatar, got it working and showing an image on my page but it seems quite small.
Looking at the param sets I can only see -variant, I’ve looked https://docs.powershelluniversal.com/ but cant find any docs, and inspecting the command / get-help I also cant see that it has a validate set either. Is there a list of values for what the variant can be? I’ve tried small, large, lg but none of them seem to make any difference.

Thanks

I did spot this thread: Universal Dashboard v3 Progress
Where the style param is being used to set the height and width, but I cant see that the -style parameter currently exists on the latest version.

I can also see that alon uses

avatars = @{
            small = @{
                width = '24px'
                height = '24px'
                margin = '16px'
                borderRadius = '50%'
            }
            medium = @{
                width = '48px'
                height = '48px'
                margin = '16px'
                borderRadius = '50%'
            }
            large = @{
                width = '96px'
                height = '96px'
                margin = '16px'
                borderRadius = '50%'
            }
        }  

In his theme, I did try this but couldnt get it to function either, I have to admit though I’m a bit hazy on the how to and struggle with theming.

I’ve played about with this and I’m struggling to work out how to style it correctly.
Ideally I’d like to just have a couple of avatars one of after the other vertically, with users names on the right, next to the avatars and centrally aligned with the image.

Currently if I put a New-UDAvatar followed by a New-UDTypography with nothing else it looks like this:
image

So far, I’ve tried playing around with the theme above, I’ve tried New-UDStyle and other methods, but I’m struggling to work out how to align these. Does anyone have an example of this or has anyone else used ClassNames and Variants as I cant find any docs on these.

Thanks

I ended up with a hacky workaround, similar to the pic above but using new-udhtml -markup and sticking a bold line of text then a line break and a normal line of text, with two lines it sort of lines up correctly.

I’ve been playing around with New-UDListItem and this looks exactly what I need and works perfectly with icons, I’ve tried passing an avatar into it, but cant get it to display, I noticed there’s an ‘-AvatarType’ which can be either ‘icon’ or ‘avatar’, but I couldnt find anything about that in the docs. @adam - is this something thats in development?

This isn’t on my radar and is probably a hold over from a long time ago. That said, we can certainly improve this, document it and make sure it works properly.

As with all our V3 components, you can check what the component’s properties are on the MUI site. If something in there looks like what you want, feel free to open an issue: React Avatar component - Material-UI

Awesome, will do, Thanks :slight_smile: