How to align Chat Messages based on 'sent' status? #3291
Replies: 1 comment 1 reply
-
from nicegui import ui
with ui.element('div').classes('w-full'):
ui.chat_message('I am the first box')
ui.chat_message('I am the second box', sent=True)
ui.run() |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
falkoschindler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hi everyone,
I have the following example code for chat messages using NiceGUI:
I would like to achieve the following:
If sent=False, the chat message should be aligned to the left side of the screen.
If sent=True, the chat message should be aligned to the right side of the screen.
Could someone please guide me on how to set this up? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions