If you make a new passage and name it StoryCaption, and put text / code / variables in there, it'll be added to the UI bar and updated on each new passage (by default, at least). You can also add code to StoryMenu, but only links in that passage will actually get displayed. All the different special passages have different qualities, locations, and default styling.
That link you posted is not an example of how to use the UI bar, it's the default html structure to aid with creating custom styles and such.