First look at PowerApps components

Last Tuesday I discovered an interesting option in the app settings of a PowerApp in my preview environment. I was able to enable PowerApps components in my app!

Components?!

This is one of the new features I have been most excited about! Think of it as reusable components. You are able to create one component and reuse it in multiple places of your app.

Where can I find components?

When you activated the components in your app through the app settings in your preview environment, you can see the components as an extra tab next to screens

After you created your first component, you can add them to your screen via the insert menu. You are able to import and export components as a msapp-file. This is how you can transfer components between apps.

When you added a component to your screen, it doesn't show all the parts of a component in your screen view. For that, you have to go back to the components tab.

Examples

Let me give some examples of components:

  • Create a menu which you can use in multiple screens
  • Create your own gallery layouts and reuse them within your app
  • Create your own custom controls
  • Create entire screens which you can reuse within your app

In short, you are able to create your own component library which you can use over and over... This is essential for PowerApps.

What about flexibility?

I know some of you are thinking: this is all nice and well, but how flexible are these components? Do these components have enough flexibility that they will do what I want on different screens or even in different apps?

That's where custom properties come in. Custom properties are going to be your best friend when working with components. Why? You can use custom properties as input or output and they have loads of data types.

In the case of the menu component, custom properties could help you with the following:

  • Setting the company colors as input
  • Define which logo you want to show, you could even show a logo based on a user profile field
  • Set the selected menu item
  • Show the user photo in de top right corner (just like Office 365 and other SaaS apps)

But custom properties can do even more. They can also output properties. This is particularly handy when you are building custom controls (think of a numeric up/down control - check out this link to Mehdi's amazing blog) and you want to output a text/number based on something that happened in the component.

Remarks

Always remember: this is a preview feature!! It is not in production yet, and there is a reason for that. Play around with it, provide feedback to the PowerApps team and make sure you are getting up to speed with this feature so you are a pro at components when this feature hits production!

Comments

comments powered by Disqus