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
Copy file name to clipboardExpand all lines: en/components/chat.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -399,6 +399,37 @@ We highly recommend using the standard Web Component styling approaches before r
399
399
-`<link>` elements – For larger stylesheets, inject them inside the Shadow DOM.
400
400
- Inline `<style>` tags – For small, scoped style overrides.
401
401
402
+
### Chat theme
403
+
404
+
Apart from the **CSS parts** and **slots**, the Chat component also has a [`chat-theme`]({environment:sassApiUrl}/themes#function-chat-theme) function exposed by our theming engine.
405
+
406
+
In order to style the Chat component using the theme function, first we need to import the theming module, where all the theme functions and component mixins live:
407
+
408
+
```scss
409
+
@use"igniteui-angular/theming"as*;
410
+
411
+
// IMPORTANT: Prior to Ignite UI for Angular version 13 use:
Then, we create a new theme that extends the [`chat-theme`]({environment:sassApiUrl}/themes#function-chat-theme) and provide the `$header-background`, `$sent-message-background` and `$received-message-background` parameters. Based on these parameter values, the `$header-color`, `$sent-message-color` and `$received-message-color` are automatically set to black or white, depending on which provides better contrast with the background.
416
+
417
+
```scss
418
+
$custom-chat-theme: chat-theme(
419
+
$header-background:#4a4a4a,
420
+
$sent-message-background:#fb8500,
421
+
$received-message-background:#e2d8c9
422
+
);
423
+
```
424
+
425
+
Finally, **include** the custom theme in your application:
0 commit comments