← Prompts
Reference Copilot Instructions Collection
Style components with modern theming using Fluent UI
Style components with modern theming using Fluent UI
# 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 -->
Sign in to view the full prompt.
Sign InClassification
Reference Documentation, cheatsheets, setup guides
Scope Project
This codebase Manual Manually placed / Persistent