# Adding a condition for user message and assisting message

**URL:** <https://community.weweb.io/t/adding-a-condition-for-user-message-and-assisting-message/20204>\
**Category:** How do I?\
**Created:** [October 19, 2025, 9:59am UTC](https://community.weweb.io/t/adding-a-condition-for-user-message-and-assisting-message/20204 "2025-10-19T09:59:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atanas](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@Atanas](https://community.weweb.io/u/Atanas)\
**Post date:** [October 19, 2025, 9:59am UTC](https://community.weweb.io/t/adding-a-condition-for-user-message-and-assisting-message/20204/1 "2025-10-19T09:59:05Z")

</div>

Hello everybody! I have a chatbot integrated with my backend Xano. I am trying to build it in front end so that, if it’s a user to be reversed on the right with different color. When it’s assistant to be on the left with different color. How can I do that? I am stuck! The Layout is like this:

List\> Collection Items(Repeated)\> Message container\> Icon container with icon inside and Text container with Text inside!

I can’t figure out how to conditionally style a message depending on the role(user or assistant). Please help!
