ChatApp with Filter Item/Search Filter using HTML CSS & JavaScript

 

ChatApp with Filter Item using JavaScript
ChatApp with Filter Item using JavaScript

Hello friends, I hope everything is going well, today you are going to learn how to create this ChatApp Design with Filterable Item and Search Filter, but before we dive into the source code and video of this I will be explaining what this project does and how you can apply this same idea in so many projects you will be creating, without further interruptions we will begin.


What is a ChatApp? A ChatApp is an application that allows users to chat with their friends and family worldwide. Some ChatApp are made through different UI and different functions but the things all ChatApp have in common are the following:


1: They all can filter by search or by read and unread or active and inactive.

2: They all work in different hosting/fetching and work in different codes but they all have the ability to communicate.

Now that we have discussed the things Chat-Applications have in common now let me further explain this Chat-Application that I have created.

Note: This ChatApp doesn't have a real-time chatting system but I hope to create that in the future.


ChatApp with Filter Item/Search Filter using HTML CSS & JavaScript [Video Tutorial]




With this video, I hope you understood the concept behind creating this project for those of you finding it difficult to create this project I will be explaining it detail by detail.

In line 17 of our javascript code, we added the keyup function to our input field
Explaining the keyup function: the keyup function is a function that detects key press, which means if I should enter key "A" and log the event (e) then it will detect that key "A" that is being pressed on the keyboard

Code Should Look Like This

eInput.addEventListener("keyup", (e) => {
console.log(e);
});


 

Now after I have done this you should look at your console by hitting the command  Ctrl+Shift+I on chrome will bring out your console and the keypress will be detected automatically.

In line 25 of our javascript code, we have another function that I have used, so many of you might have come across this function but so many might have not it is the onload function now this function is used in some cases where you cleared an active class while clicking the item but you need to bring it back you can just add the onload function to bring back that active class when the browser loads up again. Note: you don't need to close your browser to bring back that active class you can just refresh the page simply by hitting "F5".

Code Should Look Like This

window.onload = () =>{
message.classList.add("active");
};                                                                                                           

Now your code should look exactly like this hope all these helped.


if you still have difficulty understanding this project, seek the source code below.


ChatApp with Filter Item/Search Filter using HTML CSS & JavaScript [Source Code]


HTML CODE:




CSS CODE:



JAVASCRIPT CODE:



That's all now you've successfully created this ChatApp with Filter Item/Search Filter using HTML CSS & JavaScript, If you faced difficulty understanding or copying the source code you can just download the source code file from the given download button, extract the file, and use it.


Post a Comment

We welcome relevant and respectful comments. Off-topic or spam comments may be removed.

Previous Post Next Post