You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Warning: (ae-internal-missing-underscore) The name "setThemeFor" should be prefixed with an underscore because the declaration is marked as @internal
@@ -4319,9 +4317,7 @@ export const TextWeight: {
4319
4317
// @public
4320
4318
exporttypeTextWeight=ValuesOf<typeofTextWeight>;
4321
4319
4322
-
// Warning: (ae-internal-missing-underscore) The name "Theme" should be prefixed with an underscore because the declaration is marked as @internal
Copy file name to clipboardExpand all lines: packages/web-components/src/_docs/developer/quick-start.mdx
+35-24Lines changed: 35 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,53 +2,64 @@ import { Meta } from '@storybook/addon-docs/blocks';
2
2
3
3
<Metatitle="Concepts/Developer/Quick Start" />
4
4
5
-
## Install
5
+
#Quick Start
6
6
7
-
Fluent UI should be installed as a `dependency` of your app.
7
+
## Install Fluent UI Web Components v3
8
8
9
-
**Yarn**
9
+
Fluent UI web components and Fluent tokens should be installed as a `dependency` of your app. Both packages are also [available on unpkg](https://unpkg.com/@fluentui/web-components).
The easiest way to get up and running with Fluent Web Components is to use our entire component bundle. You will also need Fluent UI's design token CSS on the page in either by generating stylesheet yourself or using our `setTheme` utility.
## Recommended Usage: Use our tree-shakable component exports
29
+
30
+
To reduce your production bundle size, we offer each component as a standalone ESM export. We recommend this pathway for maximum performance and tree-shaking. There are two options for importing individual components.
31
+
32
+
### Importing the defined component
28
33
29
-
Fluent UI Web Components are styled using tokens in the form of CSS variables. You can use the `setTheme` utility to provide a theme for your website or application.
34
+
Our defined component exports will import single components _and_ define the custom element on the page.
30
35
31
36
```js
37
+
// Import with side-effectful Custom Element definitions
That's it. You can now use Fluent UI Web Components in your app.
41
-
42
-
**Importing the defined component:**
47
+
Note: If a component has a child component dependency, you will need to import both components (e.g. Tablist and Tab).
43
48
44
-
```js
45
-
import'@fluentui/web-components/button.js';
46
-
```
49
+
### Defining the element yourself using named imports
47
50
48
-
**Defining the element yourself using named imports:**
51
+
If you want to control side-effects and need granular control of when your component definitions are defined, import the named imports for each component definition, and call the `define` method.
0 commit comments