> 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/da/powershell-kommandoer/new-udtypography.md).

# New-UDTypography

New-UDTypography gengiver formateret tekst med en konfigurerbar variant, justering og skrifttykkelse i et PowerShell Universal-dashboard.

### Synopsis

Typografi giver Dem mulighed for at konfigurere og vise tekst.

### Syntaks

```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>]
```

### Beskrivelse

Opretter typografi. Typografi giver Dem mulighed for at konfigurere tekst i et dashboard.

### Parametre

#### -Id

Id for komponenten. Standardværdien er et tilfældigt GUID.

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

#### -Variant

Den type tekst, der skal vises.

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

#### -Text

Teksten, der skal formateres.

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

#### -Content

Indholdet, der skal formateres.

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

#### -Style

Et sæt CSS-typografier, der skal anvendes på typografien.

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

#### -ClassName

Et CSS-className, der skal anvendes på typografien.

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

#### -Align

Hvordan typografien justeres.

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

#### -GutterBottom

Den nederste afstand.

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

#### -NoWrap

Deaktiverer tekstombrydning.

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

#### -Truncate

Deaktiverer tekstombrydning og tilføjer ellipse ved overløb.

```
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

Temabaseret typografi-hashtable.

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

#### Fælles parametre

Denne cmdlet understøtter de fælles parametre: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable og OutVariable. Se [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216) for at få flere oplysninger.

### Output

### Eksempler

#### Eksempel 1: grundlæggende typografi

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

En grundlæggende typografikomponent, der viser en overskrift.

#### Eksempel 2: typografi med Style

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

En typografikomponent, der viser en overskrift med en rød farve.

#### Eksempel 3: justering

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

En typografikomponent, der vises med centreret justering.

#### Eksempel 4: Gutter Bottom

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

En typografikomponent, der vises med et mellemrum under teksten.

#### Eksempel 5: ingen ombrydning

```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
```

En typografikomponent, der vises uden ombrydning.

#### Eksempel 6: skrifttykkelse

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

En typografikomponent, der vises med fed skriftvægt.

#### Eksempel 7: Sx

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

En typografikomponent, der vises med en rød farve ved hjælp af temaets sx-egenskab.

#### Eksempel 8: indhold

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

En typografikomponent, der vises med en knap inde i den.

#### Eksempel 9: varianter

```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 {}
}
```

En typografikomponent, der viser alle varianterne.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
