Skip to content

Instantly share code, notes, and snippets.

@svdoever
Last active April 24, 2025 22:23
Show Gist options
  • Save svdoever/15bbea8e68760ed62ebcca9dbab67715 to your computer and use it in GitHub Desktop.
Save svdoever/15bbea8e68760ed62ebcca9dbab67715 to your computer and use it in GitHub Desktop.
An overview of all the StyleOptions that can be specified in a StyleSet for the BotFramework React Web Chat component.

🎨 Basic Styling

  • accent: string β€” Web Chat component accent color.
    Default: #0063B1
  • backgroundColor: string β€” Transcript background color.
    Default: White
  • subtle: string β€” Secondary component color.
    Default: #767676
  • paddingRegular: number β€” Default padding for most visual components.
    Default: 10
  • paddingWide: number β€” Padding for suggestedAction buttons.
    Default: 20
  • transitionDuration: string β€” Transition duration for Bubble, Carousel, and StackedLayout.
    Default: 0s

πŸ”€ Fonts

  • fontSizeSmall: number | string β€” Font size for secondary components (e.g., sendStatus).
    Default: '80%'
  • monospaceFont: string β€” Font for ErrorBox (comma-space separated).
    Default: 'Consolas', 'Courier New', 'monospace'
  • primaryFont: string β€” Font used in most visual components.
    Default: 'Calibri', 'Helvetica Neue', 'Arial', 'sans-serif'

πŸ”² Root Container

  • rootHeight: number | string β€” Height of the root container.
    Default: '100%'
  • rootWidth: number | string β€” Width of the root container.
    Default: '100%'
  • rootZIndex: number β€” z-index for root container (creates stacking context).
    Default: 0

πŸ‘€ Avatar Styling

  • avatarBorderRadius: number | string β€” Border radius for bot/user avatars.
    Default: '50%'
  • avatarSize: number β€” Avatar height and width.
    Default: 40
  • botAvatarBackgroundColor: string β€” Background color (defaults to accent).
    Default: undefined
  • botAvatarImage: string β€” Image URL for bot avatar.
    Default: undefined
  • botAvatarInitials: string β€” Bot initials; must be '' if image is used.
    Default: undefined
  • userAvatarBackgroundColor: string β€” Background color (defaults to accent).
    Default: undefined
  • userAvatarImage: string β€” Image URL for user avatar.
    Default: undefined
  • userAvatarInitials: string β€” User initials; must be '' if image is used.
    Default: undefined
  • showAvatarInGroup: true | 'sender' | 'status' β€” Avatar grouping strategy.
    Default: 'status'

πŸ’¬ Bubble Styling

  • bubbleBackground: string β€” Background for bot bubbles.
    Default: White
  • bubbleBorderColor: string β€” Border color for bot bubbles.
    Default: #E6E6E6
  • bubbleBorderRadius: number β€” Border radius for bot bubbles.
    Default: 2
  • bubbleBorderStyle: string β€” Border style for bot bubbles.
    Default: 'solid'
  • bubbleBorderWidth: number β€” Border width for bot bubbles.
    Default: 1
  • bubbleFromUserBackground: string β€” Background for user bubbles.
    Default: White
  • bubbleFromUserBorderColor: string β€” Border color for user bubbles.
    Default: #E6E6E6
  • bubbleFromUserBorderRadius: number β€” Border radius for user bubbles.
    Default: 2
  • bubbleFromUserBorderStyle: string β€” Border style for user bubbles.
    Default: 'solid'
  • bubbleFromUserBorderWidth: number β€” Border width for user bubbles.
    Default: 1
  • bubbleFromUserNubOffset: number | 'bottom' | 'top' β€” Nub offset for user bubble.
    Default: 0
  • bubbleFromUserNubSize: number β€” Nub size for user bubble.
    Default: undefined
  • bubbleFromUserTextColor: string β€” Text color for user bubble.
    Default: Black
  • bubbleImageHeight: number β€” Max height for images inside bubble.
    Default: 240
  • bubbleMaxWidth: number β€” Max width for bubble.
    Default: 480
  • bubbleMinHeight: number β€” Min height for bubble.
    Default: 40
  • bubbleMinWidth: number β€” Min width for bubble.
    Default: 250
  • bubbleNubOffset: number | 'bottom' | 'top' β€” Nub offset for bot bubble.
    Default: 0
  • bubbleNubSize: number β€” Nub size for bot bubble.
    Default: undefined
  • bubbleTextColor: string β€” Text color for bot bubble.
    Default: Black

πŸ”— Message

  • messageActivityWordBreak: 'normal' | 'break-all' | 'break-word' | 'keep-all' β€” Word-break setting for message activity.
    Default: 'break-word'

🌐 Connectivity UI

  • connectivityIconPadding: number β€” Padding around the connectivity icon.
    Default: 12 (based on paddingRegular * 1.2)
  • connectivityMarginLeftRight: number β€” Horizontal margin.
    Default: 14 (based on paddingRegular * 1.4)
  • connectivityMarginTopBottom: number β€” Vertical margin.
    Default: 8 (based on paddingRegular * 0.8)
  • connectivityTextSize: number | string β€” Text size for connectivity messages.
    Default: '75%'
  • failedConnectivity: number | string β€” Styling when connection fails.
    Default: '#C50F1F'
  • slowConnectivity: string β€” Styling for slow connection.
    Default: '#EAA300'
  • notificationText: string β€” Color for connectivity notification text.
    Default: '#5E5E5E'
  • slowConnectionAfter: number β€” Delay before showing slow connection.
    Default: 15000 (ms)

😊 Emoji

  • emojiSet: boolean | Record<string, string> β€” Emoji support or custom emoji map.
    Default: true

β™Ώ Accessibility

  • internalLiveRegionFadeAfter: number β€” Time before live region announcements fade.
    Default: 1000 (ms)

✍️ Markdown

  • markdownRespectCRLF: boolean β€” Preserve line breaks in markdown.
    Default: true
  • markdownExternalLinkIconImage: string β€” Image shown on external links.
    Default: a base64-encoded SVG icon (very long string)

πŸ–±οΈ Scroll Behavior

  • hideScrollToEndButton: boolean β€” Hides "scroll to end" button.
    Default: false
  • autoScrollSnapOnActivity: boolean | number β€” Auto-scroll pause after new activity.
    Default: false
  • autoScrollSnapOnActivityOffset: number β€” Pixel offset after auto-scroll.
    Default: 0
  • autoScrollSnapOnPage: boolean | number β€” Auto-scroll pause based on page fill.
    Default: false
  • autoScrollSnapOnPageoffset: number β€” Pixel offset after scroll snap.
    Default: 0

πŸ“ Send Box

  • hideSendBox: boolean β€” Hide the send box.
    Default: false
  • hideUploadButton: boolean β€” Hide the file upload button.
    Default: false
  • microphoneButtonColorOnDictate: string β€” Mic button color during dictation.
    Default: '#F33'
  • sendBoxBackground: string β€” Background color of send box.
    Default: 'White'
  • sendBoxButtonColor: string β€” Button color.
    Default: undefined
  • sendBoxButtonColorOnDisabled: string β€” Color when button is disabled.
    Default: '#CCC'
  • sendBoxButtonColorOnFocus: string β€” Button color on focus.
    Default: '#333'
  • sendBoxButtonColorOnHover: string β€” Button color on hover.
    Default: '#333'
  • sendBoxDisabledTextColor: string β€” Color of disabled text.
    Default: undefined
  • sendBoxHeight: number | string β€” Send box height.
    Default: 40
  • sendBoxMaxHeight: number | string β€” Max height of send box.
    Default: 200
  • sendBoxTextColor: string β€” Color of input text.
    Default: 'Black'
  • sendBoxBorderBottom: number | string β€” Bottom border.
    Default: undefined
  • sendBoxBorderLeft: number | string β€” Left border.
    Default: undefined
  • sendBoxBorderRight: number | string β€” Right border.
    Default: undefined
  • sendBoxBorderTop: number | string β€” Top border.
    Default: 'solid 1px #E6E6E6'
  • sendBoxPlaceholderColor: string β€” Placeholder text color.
    Default: undefined
  • sendBoxTextWrap: boolean β€” Allow text to wrap.
    Default: false
  • sendBoxButtonAlignment: 'bottom' | 'stretch' | 'top' β€” Button alignment.
    Default: 'stretch'

πŸ”Š Spoken Text

  • showSpokenText: boolean β€” Show spoken (speech-to-text) output.
    Default: false

πŸ”„ Spinner

  • spinnerAnimationBackgroundImage: string β€” Spinner image.
    Default: undefined
  • spinnerAnimationHeight: number | string β€” Height of spinner.
    Default: 16
  • spinnerAnimationWidth: number | string β€” Width of spinner.
    Default: 16
  • spinnerAnimationPadding: number | string β€” Padding around spinner.
    Default: 12

πŸ’‘ Suggested Actions

  • suggestedActionBackground: string β€” Background color of suggested action buttons.
    Default: 'White'
  • suggestedActionBorderColor: string β€” Border color (defaults to accent).
    Default: undefined
  • suggestedActionBorderRadius: number | string β€” Border radius.
    Default: 0
  • suggestedActionBorderStyle: string β€” Border style.
    Default: 'solid'
  • suggestedActionBorderWidth: number | string β€” Border width.
    Default: 2
  • suggestedActionDisabledBackground: string β€” Background when disabled.
    Default: undefined
  • suggestedActionDisabledBorderColor: string β€” Border color when disabled.
    Default: '#E6E6E6'
  • suggestedActionDisabledBorderStyle: string β€” Border style when disabled.
    Default: 'solid'
  • suggestedActionDisabledBorderWidth: number | string β€” Border width when disabled.
    Default: 2
  • suggestedActionDisabledTextColor: string β€” Text color when disabled.
    Default: undefined
  • suggestedActionHeight: number | string β€” Button height.
    Default: 40
  • suggestedActionImageHeight: number | string β€” Image height.
    Default: 20
  • suggestedActionLayout: 'carousel' | 'flow' | 'stacked' β€” Layout of suggested actions.
    Default: 'carousel'
  • suggestedActionTextColor: string β€” Text color.
    Default: undefined

🎠 Carousel Layout

  • suggestedActionsCarouselFlipperCursor: string β€” Mouse cursor on carousel flippers.
    Default: undefined
  • suggestedActionsCarouselFlipperBoxWidth: number β€” Flipper container width.
    Default: 40
  • suggestedActionsCarouselFlipperSize: number β€” Visible flipper size.
    Default: 20

πŸ’§ Flow Layout

  • suggestedActionsFlowMaxHeight: undefined β€” Max height for flow layout.
    Default: undefined

πŸ“š Stacked Layout

  • suggestedActionsStackedHeight: number | 'auto' β€” Max height for stacked layout.
    Default: undefined
  • suggestedActionsStackedOverflow: 'string' β€” Overflow setting.
    Default: undefined
  • suggestedActionsStackedLayoutButtonMaxHeight: number | string β€” Max height of buttons.
    Default: undefined
  • suggestedActionsStackedLayoutButtonTextWrap: boolean β€” Enable text wrap for long button text.
    Default: false

⏱️ Timestamps

  • groupTimestamp: boolean β€” Whether to group timestamps.
    Default: true
  • sendTimeout: number β€” Timeout for sending messages.
    Default: 20000
  • sendTimeoutForAttachments: number β€” Timeout for sending attachments.
    Default: 120000
  • timestampColor: string β€” Color of the timestamp.
    Default: undefined
  • timestampFormat: 'absolute' | 'relative' β€” Timestamp format style.
    Default: 'relative'

πŸ“œ Transcript

  • transcriptTerminatorBackgroundColor: string β€” Background of terminator line.
    Default: '#595959'
  • transcriptTerminatorBorderRadius: number | string β€” Radius for terminator.
    Default: 5
  • transcriptTerminatorColor: string β€” Text color of terminator.
    Default: 'White'
  • transcriptTerminatorFontSize: number | string β€” Font size.
    Default: 12
  • transcriptActivityVisualKeyboardIndicatorColor: string β€” Color of visual keyboard indicator on activities.
    Default: '#767676'
  • transcriptActivityVisualKeyboardIndicatorStyle: string β€” Style (e.g., solid/dashed).
    Default: 'dashed'
  • transcriptActivityVisualKeyboardIndicatorWidth: number | string β€” Width.
    Default: 1
  • transcriptVisualKeyboardIndicatorColor: string β€” Color for transcript-wide keyboard indicators.
    Default: 'Black'
  • transcriptVisualKeyboardIndicatorStyle: string β€” Line style.
    Default: 'solid'
  • transcriptVisualKeyboardIndicatorWidth: number | string β€” Line width.
    Default: 2

πŸ”˜ Overlay Buttons

  • newMessagesButtonFontSize: number | string β€” Font size for "new messages" button.
    Default: '85%'
  • transcriptOverlayButtonBackground: string β€” Background color.
    Default: 'rgba(0, 0, 0, .6)'
  • transcriptOverlayButtonBackgroundOnDisabled: string β€” Background when disabled.
    Default: 'rgba(0, 0, 0, .6)'
  • transcriptOverlayButtonBackgroundOnFocus: string β€” Background on focus.
    Default: 'rgba(0, 0, 0, .8)'
  • transcriptOverlayButtonBackgroundOnHover: string β€” Background on hover.
    Default: 'rgba(0, 0, 0, .8)'
  • transcriptOverlayButtonColor: string β€” Text color.
    Default: 'White'
  • transcriptOverlayButtonColorOnDisabled: string β€” Disabled text color.
    Default: 'White'
  • transcriptOverlayButtonColorOnFocus: string β€” Text color on focus.
    Default: undefined
  • transcriptOverlayButtonColorOnHover: string β€” Text color on hover.
    Default: undefined

🍞 Toasts

  • notificationDebounceTimeout: number β€” Time before showing next toast.
    Default: 400 (ms)
  • hideToaster: boolean β€” Hide toast notifications.
    Default: false
  • toasterHeight: number | string β€” Toast container height.
    Default: 32
  • toasterMaxHeight: number | string β€” Max height for all toasts.
    Default: 160 (5 Γ— 32)
  • toasterSingularMaxHeight: number | string β€” Max height for a single toast.
    Default: 50
  • toastFontSize: number | string β€” Font size.
    Default: '87.5%'
  • toastIconWidth: number | string β€” Icon width.
    Default: 36
  • toastSeparatorColor: string β€” Separator color.
    Default: '#E8EAEC'
  • toastTextPadding: number | string β€” Padding for toast text.
    Default: 6
  • toastErrorBackgroundColor: string β€” Background color for error toast.
    Default: '#FDE7E9'
  • toastErrorColor: string β€” Text color for error toast.
    Default: '#A80000'
  • toastInfoBackgroundColor: string β€” Background color for info toast.
    Default: '#CEF1FF'
  • toastInfoColor: string β€” Text color for info toast.
    Default: '#105E7D'
  • toastSuccessBackgroundColor: string β€” Background color for success toast.
    Default: '#DFF6DD'
  • toastSuccessColor: string β€” Text color for success toast.
    Default: '#107C10'
  • toastWarnBackgroundColor: string β€” Background color for warning toast.
    Default: '#FFF4CE'
  • toastWarnColor: string β€” Text color for warning toast.
    Default: '#3B3A39'

✨ Typing Animation

  • typingAnimationBackgroundImage: string β€” Image used for typing indicator.
    Default: undefined
  • typingAnimationDuration: number β€” Duration in ms.
    Default: 5000
  • typingAnimationHeight: number | string β€” Height of the typing indicator.
    Default: 20
  • typingAnimationWidth: number | string β€” Width of the typing indicator.
    Default: 64

πŸ–ΌοΈ Upload Thumbnails

  • enableUploadThumbnail: boolean β€” Enable image thumbnails for uploads.
    Default: true
  • uploadThumbnailContentType: string β€” MIME type for thumbnail.
    Default: 'image/jpeg'
  • uploadThumbnailHeight: number | string β€” Height of the thumbnail.
    Default: 360
  • uploadThumbnailQuality: number β€” Compression quality (0-1).
    Default: 0.6
  • uploadThumbnailWidth: number | string β€” Width of the thumbnail.
    Default: 720

πŸŽ₯ Video

  • videoHeight: number | string β€” Height of the video component.
    Default: 270

@svdoever
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment