How to swap usernames to other side?

karadise
she/her

New member
Artist
Streamer
Hello!! I am loving slime so far, it's so cute and versatile I'm glad I'm finally trying it out!!

I have my chat oriented to the right (which i got working) but was wondering if there's a way to make the usernames appear/align on the right of the chat message instead of the left? To make it look something like this mockup in paint i made instead:
slimechatexample.png
I tried peaking at the code but I'm super new to coding and am lost. I appreciate any help and guidance anyone can give me :D <3 And I apologize if this should be somewhere else if this isn't a feature already implemented within the code. Thank you!
 
Solution
It was a little tricky to figure out, but I came up with this:

In the CSS, update .message to this:
Code:
.message {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  text-align: right;
  gap: 0.5em;
}

and add flex-shrink: 0; to .user

You'll probably also want to change the alignment class in the HTML to one of the ones ending in -right, listed here under Vertical/Horizontal Chat and Alignment:

Zaytri
she/her

Glitch Witch
Admin
Developer
Streamer
It was a little tricky to figure out, but I came up with this:

In the CSS, update .message to this:
Code:
.message {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  text-align: right;
  gap: 0.5em;
}

and add flex-shrink: 0; to .user

You'll probably also want to change the alignment class in the HTML to one of the ones ending in -right, listed here under Vertical/Horizontal Chat and Alignment:
 
Upvote 0
Solution
Back
Top