Show element only for users that are not logged in

how do I set up a visibility of an element so that it is only visible when a user is not logged in?


Set a dynamic value on the visibility that just checks


Hi @yang. I’ve set the condition as you described, and now the element is not visible when a user is not logged in.

What works the way I expected is the following condition for the visibility’s dynamic value:

currentUser.isLoggedIn == false

Also, is there a way to switch between User roles when displaying the UI in the Plasmic’s canvas?

currentUser is only defined if auth is enabled and the user is logged in, so that’s why either !currentUser or currentUser===undefined should work.

Yes, you should see a View As menu in the top toolbar

1 Like