New-UDCard Styles

Typically with using New-UDStyle I’ve just hit the developer view in chrome (f12) and then browsed through the components and elements, checking the styles pane on the right hand side, or right click on the page component and hit inspect, you can often glean what css to modify that way.
As for card size, it fills it’s container, so I’ve usually just used new-udgrid or new-udrow / new-udcolumn for that but if you want to adjust it directly you can do it this way - you’ll just loose out on the dynamic resizing if you do:

new-udcard -Style @{width = 200; height = 80;"background-color"= "green"} -Content {
    New-UDElement -Tag div -Attributes @{style=@{width = "100%";"text-align"="center"}} -Content {
        New-UDTypography -text "test" -Variant h5
    }
}

I tried also adding ‘“text-align”= “center”’ but that didnt wanna work. So I’ve provided an option above with a workaround i’ve used in the past, basically you wrap your content with a div and centrally align that - its great for aligning in modals

With new-udstyle, I bet you were given that as a workaround prior to the -style parameter being added on new-udcard, but that seems a cleaner way now. You’re also modifying it for that individual component, you could look at using the dashboard theme options if you want to modify all components too.

As for font size, I’d typically use new-udtypography and set it on that, keeping everything defined in your dashboard theme and consistent throughout.