Skip to main content

How to Add a Button in Power Apps

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Buttons are how people do things in a canvas app: open a screen, save a record, send a request. The modern Button control follows your app's theme and works with keyboards and screen readers out of the box. Here's how to add one and set it up.

Prerequisites​

Step 1: Insert a Button​

Select the container, open Insert, expand Input and select Button:

The Insert pane with the Input category open, listing Button, Text input, Number input, Dropdown, Combobox, Date picker, Checkbox, Radio, Toggle, Attachments (Preview), Address input, Pen input, Tab list, Toolbar (Preview), Slider and Rating, with Button outlined in red

It arrives as a small filled button labelled Button:

A new button reading Button in the row container, with the properties pane showing Visible On, Text alignment, Icon rotation 0, Height 32, Flexible width Off, Width 96, Appearance Primary and Icon style Outline

Rename it; the example uses btnMyPlanHS.

Step 2: Set the Text​

btnMyPlanHS → Text
"My plan"

The formula bar with the Text property of btnMyPlanHS set to "My plan", the preview strip reading My plan, and the button on the canvas

Step 3: Size It​

A new button is 96 × 32. With an icon added, "My plan" wrapped onto two lines at that width, so the example uses:

PropertyValue
Width160
Height40

Step 4: Choose an Appearance​

Appearance sets the style. Use one Primary button for the main action on a screen:

AppearanceLooks likeExample use
ButtonAppearance.Primary (default)Filled in the theme colorThe main action, such as My plan
ButtonAppearance.SecondaryLight fillA second action, such as My team
ButtonAppearance.OutlineBorder onlyLess important actions
ButtonAppearance.Subtle / TransparentNo border or fillInline or toolbar actions
btnMyTeamHS → Appearance
ButtonAppearance.Secondary

Step 5: What OnSelect Does​

OnSelect is the formula that runs when someone selects the button, or presses Enter or Space on it. A new button's OnSelect is false, which does nothing. A typical one opens another screen:

OnSelect (example)
Navigate('My Plan Screen')

To try a button while editing, hold Alt and select it: Studio runs it as a user would. Or press F5 to preview the whole app; see How to Preview a Canvas App in Power Apps Studio.

Step 6: Give It an Accessible Label​

Studio's App checker flags new buttons with Missing accessible label. Start the label with the visible text, then add context:

btnMyPlanHS → AccessibleLabel
"My plan: the competencies for your job title"

See Fixed: Missing Accessible Label in the Power Apps App Checker.

Common Mistakes​

MistakeWhat happensDo this instead
Keeping the default 96 width with an iconThe text wraps onto two linesWiden the button
Several Primary buttons on one screenNo clear main actionOne Primary, the rest Secondary or Outline
Clicking the button in Studio to test itIt selects the button for editingHold Alt and click, or preview

Troubleshooting​

SymptomLikely causeFix
Nothing happens when selectedOnSelect is falseAdd a formula
The button is greyed outDisplayMode is DisabledSet it to Edit
The button is missing in the appVisible is falseCheck the Visible formula

FAQ​

Classic or modern button?​

Modern. It follows the theme, supports icons, and has keyboard support built in.

Can a button have an icon?​

Yes. See How to Add an Icon to a Button in Power Apps.

How do I show a button only to some people?​

With its Visible property; see How to Show or Hide a Control in Power Apps with Visible.

Conclusion​

Insert Button, set its Text, widen it if it wraps, pick an Appearance, give it an OnSelect formula and an AccessibleLabel. Test it with Alt + click or in preview.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.