DS Log
In my blog, I delve into the world of programming web technologies, Linux, Unix-like, and graphic design using free tools on Linux.
KINGCODE
KingCode Editor (ex Texty Editor) is my project developed using Java Swing. Project is still in development and in beta version. I plan to add additional features focused for PYTHON, PHP, JAVA, C, JS and BASH.
Read more ↗
VUE on Linux
In this guide, I'll walk you through the step-by-step process of setting up Vue.js on your Linux system, empowering you to create dynamic and interactive web applications. Let's harness the power of Vue.js together on the Linux platform!
Read more ↗
Symfony PHP
Dive into the world of Symfony PHP with this comprehensive introduction. In this guide, you'll learn the essential steps to create and manage posts and users, empowering you to build dynamic web applications with ease.
Read more ↗
Trying Linux from Windows
How to set up a PHP development server on Ubuntu 22.04
Text editors
List of text editors for developers.
Read more ↗
Fonts
Important fonts everyone needs to know.
Read more ↗
Try Linux from Windows
Here are some quick videos I made showing how to try out Linux Mint on Windows.
Read more ↗
Saturday, August 10, 2024
Simple Chat UI

In this blog post, we'll explore a my basic chat interface using HTML, CSS, and JavaScript. This chat UI includes features like message display, user input, and a loading animation.
Key Components
1. HTML Structure
The chat interface is built within a container div with the id "dschat-container". This container includes areas for messages, user input, and a loading animation.
2. CSS Styling
The CSS defines the layout and appearance of the chat interface. Some notable styles include:
- A blue background (#89CFF0) for the chat container
- Flexbox layout for message alignment
- Styling for the input field and send button
- A loading animation using keyframes
3. JavaScript Functionality
The JavaScript code provides the following functionality:
- Creating the base UI structure
- Adding chat messages to the interface
- Handling user input and message sending
- Implementing a fake loading animation
- Basic input validation
Key Functions
dschat_createBaseUi()
This function creates the initial structure of the chat interface, including the messages area, input field, and send button.
dschat_addChat()
Adds a new message to the chat interface, including user information, message content, and timestamp.
dschat_inputAction()
Handles the action of sending a message, including validation and adding the message to the chat.
dschat_fakeLoading()
Simulates a loading state by displaying and hiding a loading animation.
Conclusion
This code provides a foundation for a simple chat interface that can be easily customized and expanded. It demonstrates basic concepts of DOM manipulation, event handling, and UI design using HTML, CSS, and JavaScript.
To implement this chat interface in your project, you would need to integrate it with a backend system for real-time communication and user authentication. Additionally, you might want to enhance the UI with more features like message threading, file uploads, or emoji support.
View project
See the Pen
responsive chat ui by Damir Šijaković (@dsijak)
on CodePen.