Aligning text in UDTypography

I am curious about aligning text in a typography element; I am trying to get it centered. The current documentation for New-UDTypography shows a -Align parameter, and states it is a String and usage is “How to align the typography”. I am unsure, from the description, whether it means how to align the text in the typography, or the element itself. Either way, I tried something several different ways:

New-UDTypography -Id "Purpose" -Text "Purpose" -Align "center"

New-UDTypography -Id "Purpose" -Text "Purpose" -Align "Center"

New-UDTypography -Id "Purpose" -Text "Purpose" -Style @{
   "text-align" = "center"
}

…but none of them work. I can get it to work like this:

        New-UDElement -Id "Purpose" -Tag 'div' -Content {
            "Purpose"
        } -Attributes @{
            style = @{
                "text-align" = "center"
            }
        }

I am just curious if -Align should work, and if so what the correct syntax is?

Product: PowerShell Universal
Version: 2.4.1

I had the same experience in the latest universal / UD version, commented on it here:

I had a similar problem with alignment in ud-cards, which adam has filed as a bug, but at the same time I was testing, noticed typography was the same, I’m assuming this has been covered too and hopefully will be in the next update.

I’ll double check to see what bugs have been raised.

I couldnt see one already logged (apologies Adam if you’ve already covered it.)
I’ve opened an issue here: Alignment params not working on UD Card Titles and Typography components · Issue #126 · ironmansoftware/powershell-universal · GitHub

Thanks for the update, glad to know it isn’t just me :slight_smile: