New-UDLink
Synopsis
The Link component allows you to easily customize anchor elements with your theme colors and typography styles.
Syntax
New-UDLink [-Id <String>] [-Url <String>] [-Underline <String>] [-Style <Hashtable>] [-Variant <String>] [-ClassName <String>] [-OpenInNewWindow] [-Text <String>] [-OnClick <Endpoint>] [-Download] [-Aria <ScriptBlock>] [<CommonParameters>]
New-UDLink [-Id <String>] [-Url <String>] [-Underline <String>] [-Style <Hashtable>] [-Variant <String>] [-ClassName <String>] [-OpenInNewWindow] [-Children <ScriptBlock>] [-OnClick <Endpoint>] [-Download] [-Aria <ScriptBlock>] [<CommonParameters>]Description
The Link component allows you to easily customize anchor elements with your theme colors and typography styles.
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-Url
The URL of the link.
-Underline
Whether to underline the link.
-Style
A custom style to apply to the link.
-Variant
The theme variant to apply to the link.
-ClassName
The CSS class to apply to the link.
-OpenInNewWindow
Opens the link in a new window.
-Children
The components to link.
-Text
Text to include in the link.
-OnClick
A script block to invoke when clicked.
-Download
Adds the download attribute to this link.
-Aria
A script block of New-UDAriaAttribute calls that supplies ARIA or role attributes for the link.
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 link
A basic link to Google.
Example 2: Link in new window
A link to Google that opens in a new window.
Example 3: Download link
A link that downloads a file.
Example 4: Style
A link with a custom style.
Example 5: Variant
A link with a variant header of 1.
Example 6: Underline
A link with an underline on hover.
Example 7: Content
A link with an image as content.
Example 8: OnClick
A link with an onclick event.
Last updated
Was this helpful?