MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Pcf-Fluent-Modern-Theming

Pcf-Fluent-Modern-Theming是一款design方向的AI技能,核心价值是Style components with modern theming using Fluent UI,可用于解决开发者在design领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Style components with modern theming using Fluent UI

Last verified on: 2026-05-30
mkdir -p ./skills/pcf-fluent-modern-theming && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/pcf-fluent-modern-theming/SKILL.md -o ./skills/pcf-fluent-modern-theming/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Style Components with Modern Theming (Preview)


[This topic is pre-release documentation and is subject to change.]


Developers need to be able to style their components so they look like the rest of the application they're included in. They can do this when modern theming is in effect for either a canvas app (via the [Modern controls and themes](https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/modern-controls/overview-modern-controls) feature) or model-driven app (through the [new refreshed look](https://learn.microsoft.com/en-us/power-apps/user/modern-fluent-design)).


Use modern theming, which is based on [Fluent UI React v9](https://react.fluentui.dev/), to style your component. This approach is recommended to get the best performance and theming experience for your component.


Four Ways to Apply Modern Theming


1. **Fluent UI v9 controls**

2. **Fluent UI v8 controls**

3. **Non-Fluent UI controls**

4. **Custom theme providers**


Fluent UI v9 Controls


Wrapping Fluent UI v9 controls as a component is the easiest way to utilize modern theming because the modern theme is automatically applied to these controls. The only prerequisite is to ensure your component adds a dependency on the [React controls & platform libraries](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/react-controls-platform-libraries).


This approach allows your component to use the same React and Fluent libraries as the platform, and therefore share the same React context that passes the theme tokens down to the component.


xml
<resources>
  <code path="index.ts" order="1"/>
  <!-- Dependency on React controls & platform libraries -->
  <platform-library name="React" version="16.14.0" />
  <platform-library name="Fluent" version="9.46.2" />
</resources>

Fluent UI v8 Controls


Fluent provides a migration path for applying v9 theme constructs when you use Fluent UI v8 controls in your component. Use the `createV8Theme` function included in the [Fluent's v8 to v9 migration package](https://www.npmjs.com/package/@fluentui/react-migration-v8-v9) to create a v8 theme based on v9 theme tokens:


typescript
const theme = createV8Theme(
  context.fluentDesignLanguage.brand,
  context.fluentDesignLanguage.theme
);
return <ThemeProvider theme={theme}></ThemeProvider>;

Non-Fluent UI Controls


If your component doesn't use Fluent UI, you can take a dependency directly on the v9 theme tokens available through the `fluentDesignLanguage` context parameter. Use this parameter to get access to all [theme](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/theming) tokens so it can reference any aspect of the theme to style itself.


typescript
<span style={{ fontSize: context.fluentDesignLanguage.theme.fontSizeBase300 }}>
  {"Stylizing HTML with platform provided theme."}
</span>

Custom Theme Providers


When your component requires styling that is different from the current theme of the app, create your own `FluentProvider` and pass your own set of theme tokens to be used by your component.


typescript
<FluentProvider theme={context.fluentDesignLanguage.tokenTheme}>
  {/* your control */}
</FluentProvider>

Sample Controls


Examples for each of these use cases are available at [Modern Theming API control](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/sample-controls/modern-theming-api-control).


FAQ


Q: My control uses Fluent UI v9 and has a dependency on the platform libraries, but I don't want to utilize modern theming. How can I disable it for my component?


A: You can do this two different ways:


**Option 1**: Create your own component-level `FluentProvider`


typescript
<FluentProvider theme={customFluentV9Theme}>
  {/* your control */}
</FluentProvider>

**Option 2**: Wrap your control inside `IdPrefixContext.Provider` and set your own `idPrefix` value. This prevents your component from getting t

🎯 Best For

  • UI designers
  • Product designers
  • Claude users
  • GitHub Copilot users
  • Designers

💡 Use Cases

  • Generating component mockups
  • Creating design system tokens
  • Design system documentation
  • Component specification creation

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Pcf-Fluent-Modern-Theming to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

Does Pcf-Fluent-Modern-Theming generate production-ready design specs?

It generates detailed specifications that developers can use directly. Review and adjust for your specific design system.

How do I install Pcf-Fluent-Modern-Theming?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/pcf-fluent-modern-theming/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping usability testing

AI-generated designs should be validated with real users before development.

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills