Implementing Wallpapers in React JS SUSI Web Chat Application

The different SUSI AI clients need to match in their feature set. One feature that was missing in the React JS SUSI Web Chat application was the ability for users to change the application wallpaper or background. This is how we implemented it on SUSI Web Chat.
Firstly we added a text field after the circle picker that change the color of the Application body. Because there should be a place to add the wallpaper image URL. Added that text field like this.

   const components = => {

key={} className=‘circleChoose’>

Change color of {}:


         color={component} width={'100%'}
         onChangeComplete={ this.handleChangeComplete.bind(this,
         component.component) }

CirclePicker shows the circular color picker to choose the colors for each component of the application.

           this.handleChangeBackgroundImage(value) }
          floatingLabelText="Body Background Image URL" />


In ’TextField’ I have checked below condition whether to display or not to display the text field after the ‘body’ color picker.


To apply changes as soon as the user enters the image url, we refer the value of the ‘TextField’ and pass it into the ‘handleChangeBackgroundImage()’ function as ‘value’ on change like this.

           this.handleChangeBackgroundImage(value) }

In ‘‘handleChangeBackgroundImage()’ function we change the state of the application and background of the application like this.

  handleChangeBackgroundImage(backImage){'background-image', 'url('+ backImage+')');'background-repeat', 'no-repeat');'background-size', 'cover');

In here ‘’ we change the style of the application’s ‘’ tag. This is how wallpapers are changing on SUSI Web Chat Application.


React Refs:

Refer Value from text field:

Continue ReadingImplementing Wallpapers in React JS SUSI Web Chat Application