@fluentui/react-theme-sass
TypeScript icon, indicating that this package has built-in type declarations

9.0.0-alpha.23 • Public • Published

@fluentui/react-theme-sass

React Theme Sass for Fluent UI React

SASS variables referencing react-theme design tokens injected to DOM by react-provider.

Usage

  1. Instantiate a FluentProvider to inject a Fluent theme into a DOM:
import React from 'react';
import ReactDOM from 'react-dom';
import { FluentProvider, teamsLightTheme } from '@fluentui/react-components';
import App from './App';
ReactDOM.render(
  <FluentProvider theme={teamsLightTheme}>
    <App />
  </FluentProvider>,
  document.getElementById('root'),
);
  1. In SCSS styles you can import SCSS variables from @fluentui/react-theme-sass and use them in the styles:
@import '@fluentui/react-theme-sass';

.brandedElement {
  color: $colorBrandForeground1;
  background: $colorBrandBackground;
  border-radius: $borderRadiusLarge;
}

⚠ Note: This package does not export any Javascript code.️

Readme

Keywords

none

Package Sidebar

Install

npm i @fluentui/react-theme-sass

Weekly Downloads

307

Version

9.0.0-alpha.23

License

MIT

Unpacked Size

43.9 kB

Total Files

20

Last publish

Collaborators

  • sopranopillow
  • microsoft1es
  • justslone
  • chrisdholt
  • miroslavstastny
  • levithomason
  • uifabricteam
  • uifrnbot
  • dzearing
  • layershifter
  • ling1726
  • travisspomer