9.1.21 • Published 7 months ago

@fluentui/react-theme v9.1.21

Weekly downloads
847
License
MIT
Repository
github
Last release
7 months ago

@fluentui/react-theme

React Theme for Fluent UI React

Usage

Import a theme and tokens:

import { webLightTheme, tokens } from '@fluentui/react-components';

Pass the theme to the FluentProvider:

<FluentProvider theme={webLightTheme}>
  <App />
</FluentProvider>

Use the tokens in your styles:

const useStyles = makeStyles({
  root: {
    color: tokens.colorNeutralForeground1,
  },
});

Using a custom brand ramp

To use a theme based on a custom brand ramp, use the createXXXTheme function:

import { createWebLightTheme } from '@fluentui/react-components';

const customBrandRamp: BrandVariants = {
  10: `#2b2b40`,
  // ...
  160: `#e8ebfa`,
};

const customTheme = createWebLightTheme(customBrandRamp);

Contributing

Updating colors in the theme

The color tokens are generated by token pipeline. Do not edit colors directly. Instead, update the token pipeline first and once the changes are merged there, run:

yarn token-pipeline

Adding new color tokens

To add a new color token, besides updating the token pipeline, you also need to update corresponding typings and the tokens object in src/tokens.ts.

Updating other tokens

To update any tokens not related to colors, update the values directly in this package.

@everything-registry/sub-chunk-330@microsoft/arbutus.header@fluentui/react-infobutton@fluentui/react-infolabel@fluentui/react-infolabel-preview@fluentui/react-input@fluentui/react-label@fluentui/react-datepicker-compat@fluentui/react-dialog@fluentui/react-divider@fluentui/react-icons-compat@fluentui/react-image@fluentui/react-drawer@fluentui/react-field@fluentui/react-components@fluentui-copilot/tokens@fluentui/react-switch@fluentui/react-table@fluentui/react-tabs@fluentui/react-tabster@fluentui/react-textarea@fluentui/react-timepicker-compat@fluentui/react-timepicker-compat-preview@fluentui/react-toast@fluentui/react-slider@fluentui/react-spinbutton@fluentui/react-spinner@fluentui/react-swatch-picker@fluentui/react-swatch-picker-preview@fluentui/react-tag-picker@fluentui/react-tag-picker-preview@fluentui/react-tags@fluentui/react-tags-preview@fluentui/react-teaching-popover@fluentui/react-teaching-popover-preview@fluentui/react-text@fluentui/react-toolbar@fluentui/react-tooltip@fluentui/react-tree@fluentui/react-calendar-compat@fluentui/react-card@fluentui/react-carousel@fluentui/react-carousel-preview@fluentui/react-badge@fluentui/react-breadcrumb@fluentui/react-breadcrumb-preview@fluentui/react-button@fluentui/react-alert@fluentui/react-avatar@fluentui/react-accordion@fluentui/react-checkbox@fluentui/react-combobox@fluentui/react-motion-preview@fluentui/react-nav-preview@fluentui/react-make-styles@fluentui/react-menu@fluentui/react-message-bar@fluentui/react-message-bar-preview@fluentui/react-migration-v0-v9@fluentui/react-progress@fluentui/react-provider@fluentui/react-radio@fluentui/react-search-preview@fluentui/react-select@fluentui/react-shared-contexts@fluentui/react-skeleton@fluentui/react-overflow@fluentui/react-persona@fluentui/react-popover@fluentui/react-positioning@fluentui/react-link@fluentui/react-list-preview@fluentui/react-rating@fluentui/react-rating-preview@fluentui/react-search@fluentai/tokens@microsoft/arbutus.accordion@microsoft/arbutus.action-list-tile@microsoft/arbutus.action-tile@microsoft/arbutus.aside-navigation@microsoft/arbutus.badge@microsoft/arbutus.bookmark-tile@microsoft/arbutus.button@microsoft/arbutus.callout@microsoft/arbutus.code-snippet@microsoft/arbutus.command@microsoft/arbutus.component-preview@microsoft/arbutus.divider@microsoft/arbutus.embed@microsoft/arbutus.footer@microsoft/arbutus.global-styles@microsoft/arbutus.guidance@microsoft/arbutus.use-copy-to-clipboard@microsoft/arbutus.illustration-tile@microsoft/arbutus.image-tile@microsoft/arbutus.link@microsoft/arbutus.logo@microsoft/arbutus.main-navigation@microsoft/arbutus.mark-list@microsoft/arbutus.ordered-list
9.1.21

8 months ago

9.1.20

9 months ago

9.1.19

1 year ago

9.1.18

1 year ago

9.1.17

1 year ago

9.1.13

2 years ago

9.1.14

2 years ago

9.1.15

2 years ago

9.1.16

2 years ago

9.1.10

2 years ago

9.1.11

2 years ago

9.1.12

2 years ago

9.1.9

2 years ago

9.1.8

2 years ago

9.1.7

2 years ago

9.1.6

2 years ago

9.1.5

2 years ago

9.1.4

2 years ago

9.1.3

3 years ago

9.1.2

3 years ago

9.1.1

3 years ago

9.1.0

3 years ago

0.0.0

3 years ago

9.0.0

3 years ago

9.0.0-rc.10

3 years ago

9.0.0-rc.8

3 years ago

9.0.0-rc.9

3 years ago

9.0.0-rc.7

3 years ago

9.0.0-rc.6

3 years ago

9.0.0-rc.5

3 years ago

9.0.0-rc.3

3 years ago

9.0.0-rc.4

3 years ago

9.0.0-rc.1

3 years ago

9.0.0-beta.4

4 years ago

9.0.0-beta.3

4 years ago

9.0.0-beta.2

4 years ago

9.0.0-beta.1

4 years ago

9.0.0-alpha.26

4 years ago

9.0.0-alpha.24

4 years ago

9.0.0-alpha.23

4 years ago

9.0.0-alpha.22

4 years ago

9.0.0-alpha.21

4 years ago

9.0.0-alpha.20

4 years ago

9.0.0-alpha.19

4 years ago

9.0.0-alpha.18

4 years ago

9.0.0-alpha.17

4 years ago

9.0.0-alpha.16

4 years ago

9.0.0-alpha.15

4 years ago

9.0.0-alpha.14

4 years ago

9.0.0-alpha.13

4 years ago

9.0.0-alpha.11

4 years ago

9.0.0-alpha.12

4 years ago

9.0.0-alpha.10

4 years ago

9.0.0-alpha.9

4 years ago

9.0.0-alpha.8

4 years ago

9.0.0-alpha.7

4 years ago

9.0.0-alpha.6

4 years ago

9.0.0-alpha.5

4 years ago

9.0.0-alpha.4

4 years ago

9.0.0-alpha.3

4 years ago

9.0.0-alpha.2

4 years ago

9.0.0-alpha.1

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.0

4 years ago

0.3.1

4 years ago

0.2.0

4 years ago