-
Notifications
You must be signed in to change notification settings - Fork 2.7k
The Fabric Component
The Fabric
component has been deprecated in favor of ThemeProvider
starting in version 8 (ThemeProvider
will also be available in version 7 soon). Please see this page for more details.
The content below is preserved for reference purposes for those still on earlier versions.
Consumers using Fabric components should be wrapping their content within the Fabric
component.
import { Fabric } from 'office-ui-fabric-react/lib/Fabric';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
ReactDOM.render(
<Fabric>
<App />
</Fabric>,
element
);
- Note: The
Fabric
component will render a div, and will mix in div properties. You may use it as a replacement for a root div.
The Fabric
component is a root wrapper component which solves 2 problems:
-
The default fontFamily css style is defined at this layer, allowing components within to inherit the default fontFamily. The class
ms-Fabric
defines this. -
The focus rectangle visibility is managed through the
is-focusVisible
css class.
Focus rectangles around components should only be shown when the user presses tab or directional keys. When they press mouse buttons, focus rectangles should not be shown. The Fabric
component that will conditionally add/remove an is-focusVisible
class, and components rendering focus rectangles should conditionalize their visibility based on the .ms-Fabric.is-focusVisible
parent selector.
This is abstracted in the scss include focus-border()
.
- FAQ - Fabric and Stardust to Fluent UI
-
@fluentui/react
Version 9 -
@fluentui/react
Version 8 - Contributing to the
7.0
branch - How to apply themes (version 7/8)
- Planning and development process (for work by the core team)
- Conducting meetings Style guide
- Keeping up with review requests
- RFC review process
- Setup (configuring your environment)
- Fluent UI React version 7/8
- CLA
- Overview
- Repo structure
- Development process
- Contributing to previous versions
- API Extractor
- Build command changes made in early 2020
- Component implementation guide
- Creating a component
- Implementation Best Practices
- Theming
- Documenting
- Styling (old approach)
- Overview
- Testing with Jest
- E2E testing (Cypress)
- Visual testing (Screener)
- Accessibility review checklist