@@ -35,6 +35,25 @@ Before starting, ensure:
3535- [ ] Package manager (npm, yarn, pnpm) is available
3636- [ ] Project is already initialized
3737
38+ ## Theming
39+
40+ Ignite UI Web Components require a theme CSS file to render correctly. The package ships with four themes in both light and dark variants:
41+
42+ | Theme | Light | Dark |
43+ | -------| -------| ------|
44+ | Bootstrap | ` igniteui-webcomponents/themes/light/bootstrap.css ` | ` igniteui-webcomponents/themes/dark/bootstrap.css ` |
45+ | Material | ` igniteui-webcomponents/themes/light/material.css ` | ` igniteui-webcomponents/themes/dark/material.css ` |
46+ | Fluent | ` igniteui-webcomponents/themes/light/fluent.css ` | ` igniteui-webcomponents/themes/dark/fluent.css ` |
47+ | Indigo | ` igniteui-webcomponents/themes/light/indigo.css ` | ` igniteui-webcomponents/themes/dark/indigo.css ` |
48+
49+ Import the theme in your application's entry point:
50+
51+ ``` typescript
52+ import ' igniteui-webcomponents/themes/light/bootstrap.css' ;
53+ ```
54+
55+ All framework sections below include this step.
56+
3857## Common Integration Patterns
3958
4059### 1. Vanilla JavaScript / HTML
@@ -45,9 +64,12 @@ Before starting, ensure:
4564npm install igniteui-webcomponents
4665```
4766
48- ** Import and register components (in your main JS file):**
67+ ** Import and register components, and import a theme (in your main JS file):**
4968
5069``` typescript
70+ // Import a theme (required for correct styling)
71+ import ' igniteui-webcomponents/themes/light/bootstrap.css' ;
72+
5173// Option 1: Import specific components (recommended)
5274import { defineComponents , IgcButtonComponent , IgcInputComponent } from ' igniteui-webcomponents' ;
5375
@@ -90,7 +112,13 @@ For React applications, we provide a dedicated **`igniteui-react`** package that
90112** Installation:**
91113
92114``` bash
93- npm install igniteui-react
115+ npm install igniteui-react igniteui-webcomponents
116+ ```
117+
118+ ** Import a theme in your entry point (` src/main.tsx ` or ` src/index.tsx ` ):**
119+
120+ ``` typescript
121+ import ' igniteui-webcomponents/themes/light/bootstrap.css' ;
94122```
95123
96124** Usage:**
@@ -158,6 +186,7 @@ npm install igniteui-webcomponents
158186** Create a setup file (e.g., ` src/igniteui-setup.ts ` ):**
159187
160188``` typescript
189+ import ' igniteui-webcomponents/themes/light/bootstrap.css' ;
161190import { defineComponents , IgcButtonComponent , IgcInputComponent } from ' igniteui-webcomponents' ;
162191
163192// Register components once at app startup
@@ -294,6 +323,7 @@ export class AppModule {}
294323import { bootstrapApplication } from ' @angular/platform-browser' ;
295324import { appConfig } from ' ./app/app.config' ;
296325import { AppComponent } from ' ./app/app.component' ;
326+ import ' igniteui-webcomponents/themes/light/bootstrap.css' ;
297327import { defineComponents , IgcButtonComponent , IgcInputComponent } from ' igniteui-webcomponents' ;
298328
299329// Register components before bootstrapping
@@ -407,6 +437,7 @@ module.exports = {
407437``` typescript
408438import { createApp } from ' vue' ;
409439import App from ' ./App.vue' ;
440+ import ' igniteui-webcomponents/themes/light/bootstrap.css' ;
410441import { defineComponents , IgcButtonComponent , IgcInputComponent } from ' igniteui-webcomponents' ;
411442
412443// Register components
0 commit comments