FluentUI Compat

Home > @cascadiacollections/fluentui-compat > FluentThemeConsumer

FluentThemeConsumer variable

Lightweight alternative to FluentProvider for simple theme overrides. Use this instead of nesting FluentProvider when you only need theme changes.

This component provides a minimal way to override theme tokens without the overhead of a full FluentProvider, making it ideal for performance-critical scenarios where only theme changes are needed.

Signature:

FluentThemeConsumer: React.NamedExoticComponent<FluentThemeConsumerProps>

Example

import { FluentThemeConsumer } from 'fluentui-compat';

// Instead of: <FluentProvider theme={darkTheme}><Sidebar /></FluentProvider>
// Use:
<FluentThemeConsumer themeOverrides={darkTheme}>
  <Sidebar />
</FluentThemeConsumer>
  • Edit this page
In this article
Back to top FluentUI React complimentary components and utilities focused on render performance