New-UDFloatingActionButton
Synopsis
A Floating Action Button (FAB) performs the primary, or most common, action on a screen.
Syntax
New-UDFloatingActionButton [[-Id] <String>] [[-Icon] <Object>] [[-Size] <String>] [[-OnClick] <Endpoint>] [[-ClassName] <String>] [[-Color] <String>] [[-Position] <String>] [[-Aria] <ScriptBlock>] [<CommonParameters>]Description
Creates a new floating action button. Floating action buttons are good for actions that make sense for an entire page. They can be pinned to the bottom of a page.
Parameters
-Id
The ID of the component. It defaults to a random GUID.
Required? false
Position? 1
Default value ([Guid]::NewGuid())
Accept pipeline input? false
Aliases
Accept wildcard characters? false-Icon
The icon to put within the floating action button.
-Size
The size of the button. Valid values are: "small", "medium", "large"
-OnClick
A script block to execute when the floating action button is clicked.
-ClassName
A CSS class to apply to the floating action button.
-Color
The theme color to apply to the button. Valid values are: "Default", "Primary", "Secondary"
-Position
The position of the floating action button. Valid values are: "Relative", "BottomLeft", "BottomRight"
-Aria
A script block of New-UDAriaAttribute calls that supplies ARIA or role attributes for the floating action button.
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 floating action button
Creates a floating action button with a user icon and shows a toast when clicked.
Example 2: Small floating action button
Creates a small floating action button with a user icon and shows a toast when clicked.
Example 3: Position
Creates a floating action button with a user icon and shows a toast when clicked. The button is positioned in the bottom right of the buttons's container.
Last updated
Was this helpful?