> 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/de/powershell-befehle/new-udbadge.md).

# New-UDBadge

### Übersicht

Badge erzeugt ein kleines Badge oben rechts an seinem/seinen untergeordneten Element(en).

### Syntax

```powershell
New-UDBadge [[-Id] <String>] [[-Color] <String>] [[-Children] <ScriptBlock>] [[-BadgeContent] <ScriptBlock>] [-Invisible] [[-Max] <Int32>] [[-Overlap] <String>] [-ShowZero] [[-Variant] <String>] [[-Location] <String>] [[-Sx] <Hashtable>] [<CommonParameters>]
```

### Beschreibung

Badge erzeugt ein kleines Badge oben rechts an seinem/seinen untergeordneten Element(en).

### Parameter

#### -Id

Die ID der Komponente. Standardmäßig eine zufällige GUID.

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

#### -Color

Die Farbe des Badges. Gültige Werte sind: "default", "primary", "secondary", "error", "info", "success", "warning"

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

#### -Children

Der Inhalt, an den das Badge angehängt ist.

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

#### -BadgeContent

Der Inhalt, der innerhalb des Badges angezeigt wird.

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

    -Invisible [<SwitchParameter>]
        Whether the badge is invisible.

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

#### -Max

Die maximale anzuzeigende Zahl. Ist die Zahl größer als dieser Wert, wird sie als "99+" angezeigt. Standard ist 99.

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

#### -Overlap

Die Überlappung des Badges. Gültige Werte sind: "circular", "rectangular"

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

    -ShowZero [<SwitchParameter>]
        Whether to show the badge when the badgeContent is 0.

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

#### -Variant

Die Variante des Badges. Gültige Werte sind: "standard", "dot"

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

#### -Location

Die Position des Badges. Gültige Werte sind: "topright", "topleft", "bottomright", "bottomleft"

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

#### -Sx

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

    <CommonParameters>
        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).
```

### Hinweise

Allgemeine Hinweise

```
    [Component("Badge", "Badge", "Creates a new badge.")]

-------------------------- EXAMPLE 1 --------------------------

PS >New-UDBadge -Color primary -BadgeContent { 4 } -Children {
PS >   New-UDButton -Text "Primary"
PS > } -Id 'badge1'

Primary badge|Displays a badge with the text "4" on a primary button.




-------------------------- EXAMPLE 2 --------------------------

PS >New-UDBadge -Color secondary -BadgeContent { 4 } -Children {
PS >   New-UDIcon -Icon Envelope -Size 2x
PS > } -Id 'badge2'
PS > New-UDBadge -Color error -BadgeContent { 4 } -Children {
PS >   New-UDIcon -Icon Envelope -Size 2x
PS > } -Id 'badge3'

Color|Changes the color of the badge.




-------------------------- EXAMPLE 3 --------------------------

PS >New-UDBadge -ShowZero -BadgeContent { 0 } -Children {
PS >   New-UDIcon -Icon Envelope -Size 2x
PS > } -Id 'badge4'

ShowZero|Shows the badge when the badgeContent is 0.




-------------------------- EXAMPLE 4 --------------------------

PS >New-UDBadge -Max 10 -BadgeContent { 11 } -Children {
PS >   New-UDIcon -Icon Envelope -Size 2x
PS > } -Id 'badge5'

Max|The maximum number to display. If the number is greater than this, it will display as "99+". Default is 99.




-------------------------- EXAMPLE 5 --------------------------

PS >New-UDBadge -Overlap circular -BadgeContent { 4 } -Children {
PS >   New-UDIcon -Icon Envelope -Size 2x
PS > } -Id 'badge6'

Overlap|The overlap of the badge.




-------------------------- EXAMPLE 6 --------------------------

PS >New-UDBadge -Variant dot -BadgeContent { 4 } -Children {
PS >   New-UDIcon -Icon Envelope -Size 2x
PS > } -Id 'badge7'

Dot|Display a dot badge.
```


---

# 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/de/powershell-befehle/new-udbadge.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.
