# Floating Action Button

A floating action button (FAB) performs the primary, or most common, action on a screen.

A floating action button appears in front of all screen content, typically as a circular shape with an icon in its center. FABs come in two types: regular, and extended.

Only use a FAB if it is the most suitable way to present a screen’s primary action.

Only one floating action button is recommended per screen to represent the most common action.

## Floating Action Button

![](https://3638551245-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6jY7sXTmhiAIMGYw_m%2F-MAgA8lkflyE8DVzEwHy%2F-MAgAhsVKXyi_549d6AJ%2Fimage.png?alt=media\&token=b43f00df-2969-4a9e-b07d-18b7add9d9f8)

```powershell
New-UDFloatingActionButton -Icon (New-UDIcon -Icon user) -Size Small
New-UDFloatingActionButton -Icon (New-UDIcon -Icon user) -Size Medium
New-UDFloatingActionButton -Icon (New-UDIcon -Icon user) -Size Large
```

## OnClick

```powershell
New-UDFloatingActionButton -Icon (New-UDIcon -Icon user) -OnClick {
    Show-UDToast -Message "Hello!"
}
```

## API

* [New-UDFloatingActionButton](https://github.com/ironmansoftware/universal-docs/blob/master/cmdlets/New-UDFloatingActionButton.txt)
