Is there any UI framework or lib for chat?

I have spent weeks working with my chat page, but there are still many bugs. Is there any great framework or lib for such case?

Rocket chat might be interesting for you to look at .
I personally created a simple chat client using rocketchat:streamer package. But I had to build the UI myself.