Skip to content

Commit f9cdf6c

Browse files
committed
fix: Updated the integrate-with-framework skill
- Make sure to include a default prebuilt CSS theme with the components
1 parent d867953 commit f9cdf6c

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

skills/integrate-with-framework/SKILL.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
4564
npm 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)
5274
import { 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';
161190
import { defineComponents, IgcButtonComponent, IgcInputComponent } from 'igniteui-webcomponents';
162191

163192
// Register components once at app startup
@@ -294,6 +323,7 @@ export class AppModule {}
294323
import { bootstrapApplication } from '@angular/platform-browser';
295324
import { appConfig } from './app/app.config';
296325
import { AppComponent } from './app/app.component';
326+
import 'igniteui-webcomponents/themes/light/bootstrap.css';
297327
import { defineComponents, IgcButtonComponent, IgcInputComponent } from 'igniteui-webcomponents';
298328

299329
// Register components before bootstrapping
@@ -407,6 +437,7 @@ module.exports = {
407437
```typescript
408438
import { createApp } from 'vue';
409439
import App from './App.vue';
440+
import 'igniteui-webcomponents/themes/light/bootstrap.css';
410441
import { defineComponents, IgcButtonComponent, IgcInputComponent } from 'igniteui-webcomponents';
411442

412443
// Register components

0 commit comments

Comments
 (0)