A fun, animated FAB menu for Power Apps

Would you like to add a bit of fun to your Power App, while giving your users a functional new items menu? Well, I have one for you to try out! Read on to find out more about it (or skip to the end and download the Power App solution with a demo app to test out the settings).

It's not the destination, it's the journey

So, what is this thing? Essentially, it's a Power Apps component of a floating action button that, when pressed will reveal a menu in either a quarter circle or vertical stack configuration. Of course, how it reveals that menu is the fun part.
In the x and y coordinates there are switch functions that relate to one of ten easing functions (which I found at easings.net) to animate the 'out' and 'in' travel of the menu items to their final destination. Selecting a menu item will trigger navigation to the respective screen (after letting the 'in' animation run its course).

Specifically in the download (located below) is a Power Apps solution containing a component library with the one component and a demo app to demonstrate some different animations as well as provide a slightly guided approach to testing what it can do.

Let's talk parameters

So here are the input properties of the component, along with descriptions and default values. Enjoy!

PropertyDescriptionDefault value
XThe left-most edge of the component. Do not change this value as it will not work properly!If(
    Self.IsLeftHanded, 
    0,
    App.Width - Self.Width
)
YThe top-most edge of the component. Do not change this value as it will not work properly!App.Height - Self.Height - If(
    Self.IsFullSize,
    0,
    Self.ButtonBottomOffset
)
Width​The width of the component. Do not change this value as it will not work properly!If(
    Self.IsFullSize,
    App.Width,
    Self.ButtonTotalSize
)
HeightThe height of the component. ​Do not change this value as it will not work properly!If(
    Self.IsFullSize,
    App.Height,
    Self.ButtonTotalSize
)
Menu Items TableA table of the menu items containing at least the following fields: ID (int consecutively from 1 to n for n items), Name (text, the name of the menu item, preferably less than 10 characters), Screen (screen, a screen to navigate to), SVGIcon (text, the code for an SVG icon with a single color of #000000). Optionally, it can include two hex color (text) fields: BackgroundColorHex and TextColorHex.Omitted because it's really long; just check the component 😁
Menu LayoutAn integer that relates to the layout of the menu items: 1 - quarter circle, 2 - vertical1
Vertical Layout SpacingThe spacing between items in the vertical layout in pixels24
Icon SizeThe size (both for height and width) of the icons in pixels80
Grow Shrink IconA boolean property to toggle growth/shrinking of the icons as they animatetrue
Grow/Shrink Easing TypeAn integer value representing the easing equation for the horizontal motion of the menu going out. Values include 1 - linear, 2 - sine, 3 - quadratic, 4 - cubic, 5 - quartic, 6 - quintic, 7 - exponential, 8 - circular, 9 - back, 10 - elastic.6
Animation SpeedThe speed of the animation expressed in pixels per millisecond1.5
Animation DelayThe delay between items starting their animation, expressed as a decimal-based percentage of the animation time per item0.25
X Out Easing TypeAn integer value representing the easing equation for the horizontal motion of the menu going out. Values include: 1 - linear, 2 - sine, 3 - quadratic, 4 - cubic, 5 - quartic, 6 - quintic, 7 - exponential, 8 - circular, 9 - back, 10 - elastic.1
Y Out Easing TypeAn integer value representing the easing equation for the vertical motion of the menu going out. Values include: 1 - linear, 2 - sine, 3 - quadratic, 4 - cubic, 5 - quartic, 6 - quintic, 7 - exponential, 8 - circular, 9 - back, 10 - elastic.1
X In Easing Type​An integer value representing the easing equation for the horizontal motion of the menu going in. Values include: 1 - linear, 2 - sine, 3 - quadratic, 4 - cubic, 5 - quartic, 6 - quintic, 7 - exponential, 8 - circular, 9 - back, 10 - elastic.1
Y In Easing Type​An integer value representing the easing equation for the vertical motion of the menu going in. Values include: 1 - linear, 2 - sine, 3 - quadratic, 4 - cubic, 5 - quartic, 6 - quintic, 7 - exponential, 8 - circular, 9 - back, 10 - elastic.1
Button Fill Hex Color 1The first fill color in hex format​#00126b
Button Fill Hex Color 2The second fill color in hex format (if different from the first color this will create a vertical color gradient)​#00126b
Button On Hex ColorThe on color in hex format#ffffff
Button Border Hex ColorThe border color of the main button in a hex value​#00126b
Button Border RadiusThe border radius for the buttons in pixels40 (Self.IconSize / 2 should also work)
Button MarginValue for the space between the main button and the edge of the menu gallery in pixels48
Button Bottom OffsetValue for the space between the main button and the edge of the app in pixels (this is useful if you have something at the bottom of the app that the component will be over, like a mobile menu; otherwise, when the menu is expanded it will jump down to the bottom.)0
Button Press Offset​The amount in pixels that each side of the button will shrink to appear depressed4
Menu Item Fill Hex ColorThe hex color value for the menu item (unless the BackgroundColorHex is used in the Menu Items table)#00126b
Menu Item On Hex ColorThe on color value for the menu items in hex format (unless the TextColorHex is used in the Menu Items table)#ffffff
Show TextA boolean value denoting if text labels are shown on the menu items or nottrue
Shadow Hex ColorThe color of the shadow in hex format#00126b
Shadow OpacityThe opacity of the menu button shadow as a decimal (0-1)0.3
Is Left HandedOrients the menu for left handed users when set to true, right handed users when set to falsefalse
Background Overlay Hex ColorThe color of the background overlay in hex format#00000000
Background BlurThe amount of blur to be applied to the background when the menu is active in px or rem4px
Fade Blur In/OutA boolean property denoting if the background blur should be faded in/out in conjuction with the animation timertrue
Is Enabled​Boolean value denoting if the menu is enabled or disabledtrue

And here are the output properties. These are mainly used as a way for the component to easily reference its own state.

PropertyDescription
Total HeightThe total height of the menu item
Item CountThe number of items in the menu
Timer StartedA boolean property determining if the animation timer is started or not
Animation StartedA boolean value determining if the animation has started (going out) or not (going back in)
​Animation DurationThe duration of the animation in milliseconds
Button Total SizeThe size of the button including the margin in pixels
Is Full SizeA boolean property to denote if the component is full app size or not

And there you have it!

So that is a very brief description of the component and a very long detailing of the properties. The best way to experience this thing is to download the solution below and use the included demo app. There are some preset animations to try out (just select the Settings cog in the upper right-hand corner and use the dropdowns to select them) as well Custom selections where you can try your own recipes.

Please feel free to comment with any questions, suggestions, recipes of your own that you like, or if you have found this useful!

Leave a Reply

Your email address will not be published. Required fields are marked *