Docs
How to use PowerStyle
Everything you need to get a component from the library into your app in minutes.
1. Paste YAML into Power Apps Studio
Canvas apps support copying and pasting controls as YAML. Here's how to bring a component in.
- 1
Pick and customize a component
Open the Library, choose an example and tweak colors, size, radius and theme below the preview. - 2
Copy the YAML
Go to the YAML tab and click Copy. Your settings are already baked into the code. - 3
Open your app in Power Apps Studio
Open the Canvas app in edit mode and select the screen (or container) where the component should go. - 4
Paste
Right-click the screen in the Tree view and choose Paste, or press Ctrl+V. The controls appear with all properties set. - 5
Rename and wire up
Rename controls to fit your naming convention and connectOnSelect,Itemsetc. to your data.
- btnPrimary:
Control: Button
Properties:
Text: ="Save"
Fill: =RGBA(15, 108, 189, 1)
Color: =RGBA(255, 255, 255, 1)
RadiusTopLeft: =4Tip: if paste does nothing, make sure the modern Power Apps Studio is used and the clipboard contains the full YAML block, including the first line.
2. Properties, formulas & color variables
Use global variables so your whole app shares one theme — change a color once, update everywhere.
- 1
Generate a palette
Use the free Color Palette Generator to create shades from your brand color. - 2
Add it to App.OnStart
Select App in the Tree view, choose the OnStart property and paste the block. - 3
Reference the variables
Replace hard-coded colors in component properties with the variables, e.g.Fill: =gblBrand. - 4
Run OnStart
Click the … next to App and choose Run OnStart so the variables load while editing.
// App.OnStart Set(gblBrand, RGBA(15, 108, 189, 1)); Set(gblBrandDark, RGBA(11, 85, 150, 1)); Set(gblSurface, RGBA(255, 255, 255, 1)); Set(gblText, RGBA(36, 36, 36, 1)); // On a button Fill: =gblBrand HoverFill: =gblBrandDark Color: =gblSurface
Fill / Color
Background and text colors of a control.
Radius*
Corner rounding — top/bottom, left/right.
OnSelect
Formula that runs when the control is clicked.
3. Canvas App vs Power Pages
Each example has a badge telling you where it works.
| Canvas App | Power Pages | |
|---|---|---|
| What it is | Low-code apps for internal users | External-facing websites |
| How you add it | Paste YAML into Studio | Paste HTML/CSS/Liquid into the page editor or code |
| Styling | Control properties & Power Fx | CSS, Bootstrap & themes |
| Logic | Power Fx formulas | Liquid templates & JavaScript |
| Data | Connectors, Dataverse, collections | Dataverse via lists, forms & Web API |
Components marked Canvas + Pages include versions for both platforms.