New-UDCard
Synopsis
Creates a new card.
Syntax
New-UDCard [-Id <String>] [-ClassName <String>] [-Style <Hashtable>] [-Elevation <Int32>] [-Title <String>] [-TitleAlignment <String>] [-Image <String>] [-Text <String>] [-Raised] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]
New-UDCard [-Id <String>] [-ClassName <String>] [-Header <Object>] [-Body <Object>] [-Expand <Object>] [-Footer <Object>] [-Media <Object>] [-Style <Hashtable>] [-Elevation <Int32>] [-Raised] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]
New-UDCard [-Id <String>] [-ClassName <String>] [-Style <Hashtable>] [-Elevation <Int32>] [-Title <String>] [-TitleAlignment <String>] [-Content <ScriptBlock>] [-Image <String>] [-Raised] [-Avatar <Object>] [-Sx <Object>] [-Variant <String>] [-OnClick <Endpoint>] [-RemoveMargin] [<CommonParameters>]Description
Creates a new card. Cards are used to display related content.
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-ClassName
A CSS class to assign to this card.
-Header
The header for this card. The header typically contains a title for the card. Use New-UDCardHeader to create a header.
-Body
The body for this card. This is the main content for the card. Use New-UDCardHeader to create a body.
-Expand
Th expand content for this card. Expand content is show when the user clicks the expansion button. Use New-UDCardExpand to create an expand.
-Footer
The footer for this card. Footer contents typically contain actions that are relavent to the card. Use New-UDCardFooter to create a footer.
-Media
-Style
Styles to apply to the card.
-Elevation
The amount of elevation to provide the card. The more elevation, the more it will appear the card is floating off the page.
-Title
A title for the card.
-TitleAlignment
The alignment for the title.
-Content
The content of the card.
-Image
An image to show in the card.
-Text
-Raised
-Avatar
-Sx
Theme-based style to apply to the card.
-Variant
-OnClick
The action to take when the card is clicked.
-RemoveMargin
Common parameters
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
Outputs
Examples
Example 1: Basic card
A basic card with a title and text.
Example 2: Card with image
A card with an image.
Example 3: Card with elevation
A card with a higher elevation.
Example 4: Title Alignment
A card with a centered title.
Example 5: OnClick
A card with an OnClick event handler.
Example 6: Complex Card
A card with all the features.
Example 7: Dynamic Expand
A card with a dynamic expandable content. The content will be updated every time the card is expanded.
Last updated
Was this helpful?