> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/powershell-commands/new-udtypography.md).

# New-UDTypography

New-UDTypography renders styled text with a configurable variant, alignment, and font weight in a PowerShell Universal dashboard.

### Synopsis

Typography allows you to configure and display text.

### Syntax

```powershell
New-UDTypography [-Id <String>] [-Variant <String>] [[-Text] <String>] [-Style <Hashtable>] [-ClassName <String>] [-Align <String>] [-GutterBottom] [-NoWrap] [-Truncate] [-FontWeight <String>] [-Sx <Hashtable>] [<CommonParameters>]

New-UDTypography [-Id <String>] [-Variant <String>] [-Content <ScriptBlock>] [-Style <Hashtable>] [-ClassName <String>] [-Align <String>] [-GutterBottom] [-NoWrap] [-Truncate] [-FontWeight <String>] [-Sx <Hashtable>] [<CommonParameters>]
```

### Description

Creates typography. Typography allows you to configure text within a dashboard.

### Parameters

#### -Id

The ID of the component. It defaults to a random GUID.

```
Required?                    false
Position?                    named
Default value                ([Guid]::NewGuid()).ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Variant

The type of text to display.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Text

The text to format.

```
Required?                    false
Position?                    1
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Content

The content to format.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Style

A set of CSS styles to apply to the typography.

```
Required?                    false
Position?                    named
Default value                @{}
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -ClassName

A CSS className to apply to the typography.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Align

How to align the typography.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -GutterBottom

The gutter bottom.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -NoWrap

Disables text wrapping.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Truncate

Disables text wrapping and adds ellipsis for overflow.

```
Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -FontWeight

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Sx

Theme-based styling hashtable.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### Common parameters

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Outputs

### Examples

#### Example 1: Basic Typography

```powershell
New-UDTypography -Text "Hello World" -Variant "h1" -Id "typography1"
```

A basic typography component that displays a header.

#### Example 2: Typography with Style

```powershell
New-UDTypography -Text "Hello World" -Variant "h1" -Style @{color = "red"} -Id "typography2"
```

A typography component that displays a header with a red color.

#### Example 3: Alignment

```powershell
New-UDTypography -Text "Hello World" -Id "typography3" -Align "center"
```

A typography component that displays with a centered alignment.

#### Example 4: Gutter Bottom

```powershell
New-UDTypography -Text "Hello World" -Id "typography4" -GutterBottom
```

A typography component that displays with a space below the text.

#### Example 5: No Wrap

```powershell
New-UDTypography -Text "Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World!" -Id "typography5" -NoWrap
```

A typography component that displays with no wrapping.

#### Example 6: Font Weight

```powershell
New-UDTypography -Text "Hello World" -Id "typography6" -FontWeight "bold"
```

A typography component that displays with a bold font weight.

#### Example 7: Sx

```powershell
New-UDTypography -Text "Hello World" -Id "typography11" -Sx @{color = "red"}
```

A typography component that displays with a red color using the theme sx property.

#### Example 8: Content

```powershell
New-UDTypography -Id "typography12" -Content {
    New-UDButton -Text "Click Me" -Id "button1"
}
```

A typography component that displays with a button inside of it.

#### Example 9: Variants

```powershell
@("h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2",  "caption", "button", "overline", "srOnly", "inherit",  "display4", "display3", "display2", "display1", "headline", "title", "subheading") | ForEach-Object {
      New-UDTypography -Variant $_ -Text $_ -GutterBottom
      New-UDElement -Tag 'p' -Content {}
}
```

A typography component that displays all of the variants.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/powershell-commands/new-udtypography.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
