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: README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,8 @@ Include `botchat.css` and `botchat.js` in your website, e.g.:
39
39
BotChat.App({
40
40
directLine: { secret: direct_line_secret },
41
41
user: { id:'userid' },
42
-
bot: { id:'botid' }
42
+
bot: { id:'botid' },
43
+
resize:'detect'
43
44
}, document.getElementById("bot"));
44
45
</script>
45
46
</body>
@@ -105,8 +106,6 @@ You may also wish to go so far as to publish your repo as its own full-fledged,
105
106
106
107
Different projects have different build strategies, yours may vary considerably from the above. If you come up with a different integration approach that you feel would have broad application, please consider filing a [pull request](https://github.com/Microsoft/BotFramework-WebChat/pulls) for this README.
107
108
108
-
* Go to the next level with [Advanced WebChat](#advanced-webchat)
109
-
110
109
## Building WebChat
111
110
112
111
1. Clone (or fork) this repo
@@ -119,14 +118,18 @@ This builds the following:
119
118
*`/built/*.d.ts` declarations for TypeScript users - `/built/BotChat.d.ts` is the root
120
119
*`/built/*.js.map` sourcemaps for easier debugging
`/botchat.css`is currently static, but in the future it may be built
121
+
*`/botchat.css` base stylesheet
122
+
*`/botchat-fullwindow.css`media query stylesheet for a full-window experience
124
123
125
124
## Customizing WebChat
126
125
127
126
### Styling
128
127
129
-
The most obvious place to start is by altering `/botchat.css` to match the look of your site.
128
+
In the `/src/scss/` folder you will find the source files for generating `/botchat.css`. Run `npm run build-css` to compile once you've made your changes. For basic branding, change `colors.scss` to match your color scheme. For advanced styling, change `botchat.scss`.
129
+
130
+
#### Card Sizes / Responsiveness
131
+
132
+
WebChat strives to use responsive design when possible. As part of this, WebChat cards come in 3 sizes: narrow (216px), normal (320px) and wide (416px). In a full-window chat, these sizes are invoked by a CSS media query in the `/botchat-fullwindow.css` style sheet. You may customize this style sheet for the media query breakpoints in your own application. Or, if your WebChat implementation is not a full-window experience, you can manually invoke card sizes by adding the CSS classes `wc-narrow` and `wc-wide` to the HTML element containing your chat.
0 commit comments