NewPower Apps · canvas componentButtons and actions✓ Tested in StudioMIT License
Floating action button
The screen's main action, usually Add new, as a floating button: ready with no setup, extended with a label, or opening a speed-dial menu of more actions. Accessible, sized for touch, coloured to match your app.
- Name in Studio
- lcsFab
- Version
- 0.3.0
- Properties
- 14 inputs · 2 outputs · 1 output function · 2 events · 3 actions
Variations
As it is when you paste it, with every input at its default.
Formulas on this screen
Set the same ones in Studio to try it the same way; there, each Notify shows its event in a banner, which this preview leaves out so nothing covers the component. The instance names are the ones Studio gives the first copy on a screen.
lcsFab_1.OnSelect = Notify(lcsFab_1.Label & " selected")
lcsFab_1.OnItemSelect = Notify("You chose " & Label & " (" & Key & ")")
A web replica that behaves as the component does in Power Apps. In Studio it uses Microsoft's controls, which can look slightly different.
Add it in five steps
- In Power Apps Studio, open Settings > Updates and check that Modern controls and themes and Enhanced component properties are on.
- Open the Components tab in the tree view and select New component.
- Select an empty part of Studio, so the new component isn't selected.
- Copy the YAML on this page and press Ctrl+V.
lcsFabappears with all its properties. - On a screen, insert it from Insert > Custom >
lcsFab.
What it needs
- No premium licence: standard controls, no connectors
- Modern controls and themes: on
- Enhanced component properties: on
- Tested in Power Apps Studio 3.26094.9 on October 11, 2026
- Version 0.3.0
Properties (22)
Read from the component's own YAML, so they always match what you paste.
| Property | Kind | Type | Default |
|---|---|---|---|
IconThe icon: Add, Edit, Send, Search, Upload, Download, Camera, Check, Share, Chat or Close. | Input | Text | "Add" |
LabelWhat the button does, such as Add new or New request. Shown when Extended is true, and always read by screen readers. | Input | Text | "Add new" |
ExtendedWhen true, the button shows its label next to the icon. | Input | Boolean | false |
SizeSmall (40), Regular (56) or Large (72). | Input | Text | "Regular" |
AccentColorThe button's colour. Use your app's brand colour. | Input | Color | RGBA(15, 108, 189, 1) |
ContentColorThe icon and label colour on the button. Keep it readable on AccentColor. | Input | Color | RGBA(255, 255, 255, 1) |
SpeedDialWhen true, the button opens a menu of Items instead of running OnSelect. | Input | Boolean | false |
ItemsThe speed-dial actions, as a table with Key, Icon and Label columns. Key is a short id your OnItemSelect checks, such as note. Three to six work best. | Input | Table | Table(
{Key: "note", Icon: "Edit", Label: "New note"},
{Key: "photo", Icon: "Camera", Label: "Take a photo"},
{Key: "upload", Icon: "Upload", Label: "Upload a file"}
) |
HiddenKeysKeys of items to hide, separated by commas, such as If(!IsAdmin, "delete", ""). Empty shows every item. | Input | Text | "" |
DisabledKeysKeys of items to show greyed out and unselectable, separated by commas. | Input | Text | "" |
DirectionWhere the menu opens: Up (above the button, for the bottom of a screen) or Down (below it, for the top). | Input | Text | "Up" |
ItemHeightThe height of each speed-dial row in pixels. 44 or more is easy to tap. | Input | Number | 48 |
DisabledWhen true, the button is greyed out and can't be selected. | Input | Boolean | false |
MotionWith a speed dial, its icon turns into the close mark as the menu opens, and back as it closes, and the menu's icons pop in. None plays for people who've asked their device for reduced motion. | Input | Boolean | true |
| Property | Kind | Type | Default |
|---|---|---|---|
IsOpenTrue while the speed-dial menu is open. | Output | Boolean | — |
SelectedKeyThe Key of the speed-dial item chosen last. | Output | Text | — |
| Property | Kind | Type | Default |
|---|---|---|---|
IconSvg(Name, Stroke)Returns one of the button's icons as an image your app can use, in any colour: set an Image control's Image to it.
| OutputFunction | Text | — |
| Property | Kind | Type | Default |
|---|---|---|---|
OnSelect()Runs in the app when the button is selected and SpeedDial is false. | Event | — | false |
OnItemSelect(Key, Label)Runs in the app when a speed-dial item is selected. Receives its Key and Label; use Switch(Key, ...) for what each does. The menu has already closed.
| Event | — | false |
| Property | Kind | Type | Default |
|---|---|---|---|
Open()Opens the speed-dial menu. | Action | — | — |
Close()Closes the speed-dial menu. | Action | — | — |
Toggle()Opens the speed-dial menu if it's closed, and closes it if it's open. | Action | — | — |
Guide
Use lcsFab for the one action people come to a screen for, which is usually adding a new item: a new request, a new note, a new contact. It floats in a corner, so it's always within reach on a phone. Out of the box it's a + labelled "Add new"; you only set what happens on select.
- Plain: an icon in a rounded square. Set
Sizeto Small, Regular or Large. - Extended: the icon plus a label, when the action needs words ("New request").
- Speed dial: set
SpeedDialto true and give itItems; it opens a short menu of related actions. OneOnItemSelectformula decides what each item does, by itsKey. - Dynamic menus without editing the table:
HiddenKeyshides items (such as admin-only actions) andDisabledKeysgreys them out.Directionopens the menu up or down.
Put it in a bottom corner, last in the tree view so it's on top, and name it fabMain. Anchor it to the corner:
// fabMain.X
Parent.Width - Self.Width - 24
// fabMain.Y
Parent.Height - Self.Height - 24
Add a new item (the usual case). With a form on another screen:
// fabMain.OnSelect
NewForm(frmRequest);
Navigate(scrEdit)
Or add a row straight away and open it:
// fabMain.OnSelect
Set(locNew, Patch(Requests, Defaults(Requests), { Title: "New request" }));
Navigate(scrEdit)
Say what's being added, so screen reader users hear it, and show it on wider screens:
// fabMain.Label
"New request"
// fabMain.Extended
App.Width > 640
Only let people add when they can:
// fabMain.Disabled
!locCanCreate
A speed dial that does something different for each item:
// fabMain.SpeedDial
true
// fabMain.Items
Table(
{Key: "note", Icon: "Edit", Label: "New note"},
{Key: "photo", Icon: "Camera", Label: "Take a photo"},
{Key: "upload", Icon: "Upload", Label: "Upload a file"},
{Key: "delete", Icon: "Close", Label: "Delete all"}
)
// fabMain.OnItemSelect
Switch(
Key,
"note", Navigate(scrNote),
"photo", Navigate(scrCamera),
"upload", Navigate(scrUpload),
"delete", dlgDeleteAll.Open()
)
Because OnItemSelect checks the Key, you can rename or translate the labels without touching it.
Show "Delete all" to admins only, and grey out the photo item when there's no camera:
// fabMain.HiddenKeys
If(!locIsAdmin, "delete", "")
// fabMain.DisabledKeys
If(locOffline, "photo,upload", "")
At the top of a screen, open the menu downward:
// fabMain.Direction
"Down"
Close the menu from elsewhere, such as when the screen changes:
fabMain.Close()
Use its icons in your own app with the output function:
// imgSearch.Image
fabMain.IconSvg("Search", "#0F6CBD")
Nothing changes: the button holds no data. OnSelect and OnItemSelect run whatever you write, such as NewForm on a form bound to a Dataverse table.
- The button's accessible name is its
Label, even when only the icon shows, plus "open menu" or "close menu" with a speed dial. Write the label as the action: "New request", not "Plus". - Every speed-dial item is a button named after its label. A disabled item can't be selected, and is greyed. The hit areas are classic buttons, whose accessible name is their
Text; the text is there, in a transparent colour. - Keep
ContentColorreadable onAccentColor: white on the default blue is 5:1. - Regular (56) and Large (72) sizes are comfortable to tap; prefer Small (40) only on desktop screens.
- With
Motionon (the default) and a speed dial, the icon turns into the close mark as the menu opens and back as it closes, and the menu's icons pop in, each in a third of a second or less. None plays for people who've asked their device for reduced motion, andMotionset to false changes them at once, as in 0.2.0.
- With
SpeedDialon, the component is always as big as the open menu, so the button sits in its bottom-right corner (top-right withDirectionDown). The empty area is transparent and lets taps through while the menu is closed. Leave room above it. - Clicking outside the menu closes it only within the component's area; call
Close()from the screen's other actions if needed. - Every row of
ItemsneedsKey,IconandLabelcolumns. - IconSvg is an output function, so it only uses its two parameters. Colours are hex codes, such as
#FFFFFF.
- 0.3.0: motion for the speed dial: its icon turns into the close mark and back, and the menu's icons pop in (skipped for reduced motion); a
Motioninput turns it off. WithMotionoff, it's exactly 0.2.0. - 0.2.0: items have a
Key, andOnItemSelectreceivesKeyandLabel;HiddenKeys,DisabledKeysandDirectioninputs;SelectedKeyoutput. Sized from its inputs only. - 0.1.0: first version, for testing in Power Apps Studio. Written from scratch; Studio's structure for galleries and containers was confirmed with an MIT-licensed sample shared by the product owner (see
NOTICES.md).
Did it work for you?
No ratings yet.Nobody has said it worked in their app yet.
Sign in to rate it or to say it worked in your app.
Comments
No comments yet. Share how you used it, or ask something.
Sign in to comment or reply. Comments show under a display name you choose, never your email.