InstructionMITv1.0.0awesome-copilot

How to Use the Sample Components

How to use and run PCF sample components from the PowerApps-Samples repository

At a glance

Kind
Instruction · Ananke prompt
Reference
awesome-copilot/pcf-sample-components · ananke://prompt/awesome-copilot/pcf-sample-components@1.0.0
Applies to
**/*.{ts,tsx,js,json,xml,pcfproj,csproj}
Files
1 · 5.9 KB
How it's used
Instructions apply automatically to files matching their applyTo glob in GitHub Copilot. For Claude Code, reference the file from CLAUDE.md.

Where it fits

Platform
Ananke PlexusGitHub Copilot
Needs
Nothing (text only)

Facets suggested from the item's own text and tags, not yet reviewed. Facets say where an item is relevant, not that it will run in your setup. How facets work

Checked by Dex

Verified, not self-reported: dex-trove 0.3.16 installed this item into each layout and checked that the tool can load it. Dex collects no download or usage data.

  • GitHub Copilot ✓ loads

Upstream metadata

Self-reported by the item's author; Dex shows it as written.

applyTo**/*.{ts,tsx,js,json,xml,pcfproj,csproj}

Documentation

View upstream ↗
Contents

All the sample components listed under this section are available to download from github.com/microsoft/PowerApps-Samples/tree/master/component-framework so that you can try them out in your model-driven or canvas apps.

The individual sample component topics under this section provide you an overview of the sample component, its visual appearance, and a link to the complete sample component.

Before You Can Try the Sample Components

To try the sample components, you must first:

Try the Sample Components

Follow the steps in the README.md to generate solutions containing the controls so you can import and try the sample components in your model-driven or canvas app.

How to Run the Sample Components

Use the following steps to import and try the sample components in your model-driven or canvas app.

Step-by-Step Process

  1. Download or clone the repository

  2. Open Developer Command Prompt

  3. Install dependencies

    • Navigate to the component you want to try, for example IncrementControl, and run:
    npm install
  4. Restore project

    • After the command has completed, run:
    msbuild /t:restore
  5. Create solution folder

    • Create a new folder inside the sample component folder:
    mkdir IncrementControlSolution
  6. Navigate to solution folder

    cd IncrementControlSolution
  7. Initialize solution

    • Inside the folder you created, run the pac solution init command:
    pac solution init --publisher-name powerapps_samples --publisher-prefix sample

    Note: This command creates a new file named IncrementControlSolution.cdsproj in the folder.

  8. Add component reference

    • Run the pac solution add-reference command with the path set to the location of the .pcfproj file:
    pac solution add-reference --path ../../IncrementControl

    or

    pac solution add-reference --path ../../IncrementControl/IncrementControl.pcfproj

    Important: Reference the folder that contains the .pcfproj file for the control you want to add.

  9. Build the solution

    • To generate a zip file from your solution project, run the following three commands:
    msbuild /t:restore
    msbuild /t:rebuild /restore /p:Configuration=Release
    msbuild
    • The generated solution zip file becomes in the IncrementControlSolution\bin\debug folder.
  10. Import the solution

  11. Add components to apps

Available Sample Components

The repository contains numerous sample components including:

  • AngularJSFlipControl
  • CanvasGridControl
  • ChoicesPickerControl
  • ChoicesPickerReactControl
  • CodeInterpreterControl
  • ControlStateAPI
  • DataSetGrid
  • DeviceApiControl
  • FacepileReactControl
  • FluentThemingAPIControl
  • FormattingAPIControl
  • IFrameControl
  • ImageUploadControl
  • IncrementControl
  • LinearInputControl
  • LocalizationAPIControl
  • LookupSimpleControl
  • MapControl
  • ModelDrivenGridControl
  • MultiSelectOptionSetControl
  • NavigationAPIControl
  • ObjectOutputControl
  • PowerAppsGridCustomizerControl
  • PropertySetTableControl
  • ReactStandardControl
  • TableControl
  • TableGrid
  • WebAPIControl

Each sample demonstrates different aspects of the Power Apps component framework and can serve as a learning resource or starting point for your own components.