When you add a modern page to a site, you add and customize web parts, which are the building blocks of your page. This article focuses on the Button web part.
The Button web part lets you easily add a button to your page with your own label and link, as well as other actions like running a Power Automate flow or opening Copilot in SharePoint.
Here is an example of each type of button on a page:
Note
SharePoint in Microsoft 365 supports the button web part in modern pages. Some functionality is introduced gradually to organizations that have opted in to the Targeted Release program. This means that you may not yet see this feature or it may look different than what is described in the help articles.
Note
SharePoint Server Subscription Edition users may have a different experience starting with the SharePoint Server Subscription Edition Version 22H2 feature update. This feature update is included in the September 2022 Public Update for SharePoint Server Subscription Edition, as well as all future public updates for Sharepoint Subscription Edition.
- If the Version 22H2 feature update hasn't been installed, then the button web part won't be added to modern pages.
- If the farm administrator has configured the farm to be in the "Standard release" feature release ring, then the button web part won't be added to modern pages. SharePoint Server Subscription Edition farms are in the "Standard release" feature release ring by default.
- If the farm administrator has configured the farm to be in the "Early release" feature release ring, then SharePoint Server Subscription Edition adds support for the button web part in modern pages.
- SharePoint farm administrators can select the feature release ring for their SharePoint Server Subscription Edition farms by going to Central Administration > System Settings > Feature release preference.
Open a link from a button
Go to the page where you want to add the Button web part.
If your page is not already in edit mode, click Edit at the top right of the page.
Hover your mouse above or below an existing web part and you'll see a line with a circled +, like this:
Click +, and then search for and select Button from the list of web parts.
Select Edit properties
Add the Button text you want to appear on the page.
Confirm your action from the dropdown, the default action type will be to open a link you provide. More information below on additional action types
- Open link (this is the default action type)
- Open Copilot in SharePoint
- Run Power Automate flow
Enter your link in the Link box. Make sure your link starts with http://, https://, or mailto: If your link is added without one of these protocols, https:// will be added for you.
Under Alignment, choose how you want the button aligned (left, center, or right) within its column on the page.
Open Copilot in SharePoint from a button
Note
This action type is only available for users with a valid license for Copilot in SharePoint. Additionally, page viewers will need the same license in order to see and use the button. Unlicensed users will not see the button on the page.
- From the action dropdown, select Open Copilot in SharePoint.
- Enter a custom prompt that will run when licensed users click on the page button.
- Save the page and you'll be able to click your button and the Copilot pane will open with the custom prompt running.
Run a Power Automate flow from a button
Note
For more information on creating and running Power Automate flows visit Use SharePoint and Power Automate to build workflows.
- From the action dropdown, select Run Power Automate flow
- Copy and paste your Flow ID from Power Automate into the Flow ID field, for more examples see instructions on how to get the Flow ID. This will not automatically share or provide permissions for other users to run the underlying flow.
- Save the page and you'll be able to click your button and the run a flow side panel will open to ensure connections are properly configured for the user running the flow and the confirmation to run the flow.
Customize the button
Select the button to open the formatting toolbar. Along with standard text formatting—font size, Bold, Italic, Underline, and font color—you can adjust the following button-appearance options:
- Color fill: Set the button's fill (background) color. Choose from Theme colors or Standard colors, or select More custom colors to pick a specific color. Select Reset to default to return to the theme color.
- Hover effect: Choose how the button responds when someone points at it: Lighten or Darken.
- Border properties: Open the Border properties panel to shape and style the button's border
- Shape: Rounded, Rectangular, Pill, or Circular.
- Weight: border thickness (1px, 2px, 4px, 6px, or 8px.)
- Style: Solid, Dashed, Dotted, or Double.
- Border Color: Theme colors, Standard colors, or More custom colors.
- Reset to default: revert the border to its default.
- Clear all formatting: remove all custom formatting and return the button to its default appearance.
Related information
To change the overall look and theme of your site, see Change the look of your SharePoint site.