UI State
  • UI State is useful for keeping track of the current view and state of your application.
  • To set/update a UI state variable, use the set() predicate:
set(var_id, var_value)
prompt :-
show [
button('Create Guestbook', [ set(tab, create) ]),
button('View Guestbook', [ set(tab, view) ]),
button('Open Guestbook', [ set(tab, open) ])
var_id must be in snake_case OR camelCase.
  • To get the current value of a UI state variable, use the get() predicate:
get(var_id, var_value)
prompt :- get(tab, create), show[text('Create Prompt')].
prompt :- get(tab, view), show[text('View Prompt')].
prompt :- get(tab, open), show[text('Open Prompt')].
Copy link