Open In App

Blaze UI Example Chat

Blaze UI is a free open-source UI Toolkit that provides a great structure for building websites quickly with a scalable and maintainable foundation. All components in Blaze UI are developed mobile-first and rely solely on native browser features, not a separate library or framework. It helps us to create a scalable and responsive website fast and efficiently with a consistent style.

In this article, we will see the example of chat. Chat is a conversation between two people, for example, a WhatsApp chat box.



Classes Used:

Example 1: In the below code, we will use the above classes to demonstrate what the inbox of chat looks like.






<!DOCTYPE html>
  
<html>
  
<head>
    <link rel="stylesheet" href=
    <script src=
    </script>
</head>
  
<body>
    <center>
        <div class="o-container o-container--medium">
            <center>
                <h1 style="color: green">
                    GeeksforGeeks
                </h1>
  
                <h3>A computer science portal for geeks</h3>
            </center>
  
            <div style="margin-left:195px; width:750px;" 
                 class="o-grid o-grid--no-gutter">
                <div class="o-grid__cell 
                            o-grid__cell--width-40">
                    <div class="c-card">
                        <div role="separator" 
                             class="c-card__item 
                                    c-card__item--divider">
                            <div class="o-field o-field--icon-left 
                                        u-small">
                                <i class="fas fa-search c-icon"></i>
                                <input class="c-field" 
                                       type="text" />
                            </div>
                        </div>
                        <div class="o-grid o-grid--no-gutter c-card__item">
  
                            <div class="o-grid__cell">
                                <div class="u-text--loud">
                                  GeeksforGeeks</div>
                                <div class="u-text--quiet u-small">
                                    Welcome to Geeksfor Geeks!!
                                </div>
                            </div>
                            <div class="o-grid__cell o-grid__cell--width-25">
                                <div class="u-text--quiet u-small u-right">
                                    10:07
                                </div>
                            </div>
                        </div>
                        <div class="o-grid o-grid--no-gutter 
                                    c-card__item c-card__item--success">
  
                            <div class="o-grid__cell">
                                <div class="u-text--loud">MOM</div>
                                <div class="u-text--quiet u-small">
                                    Where are you?!!
                                </div>
                            </div>
                            <div class="o-grid__cell o-grid__cell--width-25">
                                <div class="u-text--quiet u-small u-right">
                                    00:05
                                </div>
                            </div>
                        </div>
                        <div class="o-grid o-grid--no-gutter c-card__item">
  
                            <div class="o-grid__cell">
                                <div class="u-text--loud">Natasha</div>
                                <div class="u-text--quiet u-small">
                                    We should go out tonight...
                                </div>
                            </div>
                            <div class="o-grid__cell o-grid__cell--width-25">
                                <div class="u-text--quiet u-small u-right">
                                    Yesterday
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </center>
</body>
  
</html>

Output:

 

Example2: In the below code, we will see what the conversation between two mates looks like.




<!DOCTYPE html>
  
<html>
  
<head>
    <link rel="stylesheet" href=
  
    <script src=
    </script>
</head>
  
<body>
    <center>
        <div class="o-container o-container--medium">
            <center>
                <h1 style="color: green">
                    GeeksforGeeks
                </h1>
  
                <h3>A computer science portal for geeks</h3>
            </center>
  
            <div class="o-grid__cell o-grid__cell--width-60">
                <div class="o-grid">
                    <div class="o-grid__cell o-grid__cell--width-50">
                        <div class="c-card">
                            <div class="c-card__item">
                                Hello Krishna, How can i help you?</div>
                        </div>
                    </div>
                </div>
  
                <div class="o-grid">
                    <div class="o-grid__cell o-grid__cell--width-50 
                                o-grid__cell--offset-50">
                        <div class="c-card">
                            <div class="c-card__item c-card__item--success">
                                I need to know about the courses you offer?
                            </div>
                        </div>
                    </div>
                </div>
                <div class="o-grid">
                    <div class="o-grid__cell o-grid__cell--width-50">
                        <div class="c-card">
                            <div class="c-card__item">
                                GeeksforGeeks offers many useful courses
                                like DSA, CIP, CP and
                                many more.</div>
                        </div>
                    </div>
                </div>
                <div class="o-grid">
                    <div class="o-grid__cell o-grid__cell--width-50 
                                o-grid__cell--offset-50">
                        <div class="c-card">
                            <div class="c-card__item c-card__item--success">
                                Thank you so much for sharing the information.
                            </div>
                        </div>
                    </div>
                </div>
                <div class="c-input-group u-letter-box-medium">
                    <div class="o-field o-field--icon-right">
                        <input class="c-field" placeholder="Message" />
                        <i class="fa-fw far fa-smile c-icon"></i>
                    </div>
                    <button class="c-button c-button--brand" 
                            aria-label="Send message">
                        <i class="fa-fw far fa-paper-plane"></i>
                    </button>
                </div>
            </div>
  
        </div>
    </center>
</body>
  
</html>

Output:

 

Reference: https://www.blazeui.com/examples/chat/


Article Tags :