Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Office UI Fabric React Component SnippetsNew to Visual Studio Code? Get it now.
Office UI Fabric React Component Snippets

Office UI Fabric React Component Snippets

jordanjanzen

|
2,268 installs
| (0) | Free
Snippets for Fabric React and mergeStyles
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Office UI Fabric React Snippets

This extension contains code snippets for creating components for Office UI Fabric React and it's styling library mergeStyles.

Installation

In order to install an extension you need to launch the Command Pallete (Ctrl + Shift + P or Cmd + Shift + P) and type Extensions. There you have either the option to show the already installed snippets or install new ones.

Supported languages (file extensions)

  • TypeScript (.ts)
  • TypeScript React (.tsx)

Usage

When creating a new Fabric React component, or converting an old one from sass, these snippets can be useful to scaffold some of the most used code.

Snippets

Below is a list of all available snippets and the triggers for each one.

File-type Trigger Description
.ts fabric-componentTypes→ Scaffolds a Component.types.ts file.
.ts fabric-getStyles→ Scaffolds a Component.styles.ts file.
.tsx fabric-styledComponent→ Scaffolds your Component.tsx file
.tsx fabric-classNamesFunction→ Generates base functions for enabling themes and getStyles API
.tsx fabric-classNamesConst→ Generates base for getting your classNames from the styles file.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft