YAML Code Export
Every component page generates Power Apps YAML from your current settings. The copy and paste steps are on Getting Started; this page explains what you are copying.
What is YAML?
YAML is a human-readable text format. Power Apps Studio uses it to describe screens, controls and their properties, and its Paste code command turns that text into real controls. PowerLibs writes Power Apps' own flavour of it, not generic YAML.
What the code looks like
This is the start of the code the Classic Button generates with its default settings. Every control starts with its name and a Control: line, and every formula value starts with =:
- btnButton:
Control: Classic/Button@2.2.0
Properties:
BorderStyle: =BorderStyle.None
Color: =RGBA(255, 255, 255, 1)
Fill: =RGBA(59, 130, 246, 1)
Height: =32
HoverBorderColor: =ColorFade(Self.BorderColor, -20%)
HoverColor: =Self.Color
HoverFill: =ColorFade(Self.Fill, -10%)
PressedBorderColor: =ColorFade(Self.BorderColor, -40%)
PressedFill: =ColorFade(Self.Fill, -20%)
RadiusBottomLeft: =5
RadiusBottomRight: =5
The control names use your prefixes (btn, lbl, con and so on), which accounts on Ultra, Team or Lifetime can change under Variable Prefix. The colours come from the brand colour and the light or dark theme you picked on the card.
Classic and Modern controls
Power Apps has two control sets. Classic controls are the original ones with the most properties. Modern controls are the newer Fluent controls with a cleaner look and fewer properties. Components that support both show a Select Version menu on the Copy YAML button with Modern Controls and Classic Controls; components without the menu always copy Classic. Modern Controls is switched off once a custom icon is pasted into a component, because modern controls cannot show custom SVG icons.
Where the code is generated
While the YAML tab is open, the code is regenerated on the server shortly after each change you make in Settings, so what you see is always what Copy YAML will give you. Copying also happens on the server, which is how the plan check above is enforced.