TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pompom454/tea/llms.txt
Use this file to discover all available pages before exploring further.
UIBar API gives you programmatic control over the UI bar—the collapsible sidebar that Tea renders by default on the left side of every story. It contains the story title, navigation history buttons, and the main menu. You may want to hide or stow it on specific passages (e.g., title screens, cutscenes, or puzzle passages where the sidebar would be distracting), or remove it entirely when using a custom StoryInterface.
Most
UIBar methods return a reference to the UIBar object itself, allowing you to chain multiple calls together.UIBar.destroy()
Completely removes the UI bar from the page, including all of its associated styles and event handlers. This operation cannot be undone.This method does not return a value.
UIBar.hide()
Hides the UI bar element. Returns theUIBar object for chaining.
The
UIBar object, for method chaining.Hiding the UI bar does not reclaim the horizontal space reserved for it. If you also want to reclaim that space, chain a call to
UIBar.stow(). Alternatively, if you want the UI bar gone permanently, use UIBar.destroy().- Basic usage
- Hide and stow
UIBar.isHidden()
Returns whether the UI bar is currently hidden.true if the UI bar is hidden, false otherwise.UIBar.isStowed()
Returns whether the UI bar is currently stowed.true if the UI bar is stowed, false otherwise.UIBar.show()
Shows the UI bar. Returns theUIBar object for chaining.
The
UIBar object, for method chaining.- Basic usage
- Unstow and show
UIBar.stow()
Stows the UI bar so that it takes up minimal space (collapsed to the edge of the viewport). Returns theUIBar object for chaining.
When
true, skips the default collapse animation and stows the bar instantly.The
UIBar object, for method chaining.- Basic usage
- Without animation
UIBar.unstow()
Unstows the UI bar, expanding it back to its full size so it is fully accessible again. Returns theUIBar object for chaining.
When
true, skips the default expand animation and unstows the bar instantly.The
UIBar object, for method chaining.- Basic usage
- Without animation
Chaining example
Becausehide(), show(), stow(), and unstow() all return the UIBar object, you can chain calls to perform multiple operations at once.
Hide vs. stow vs. destroy
Hide vs. stow vs. destroy
| Method | Visual result | Recoverable | Reclaims space |
|---|---|---|---|
UIBar.hide() | Bar invisible | Yes | No |
UIBar.stow() | Bar collapsed to edge | Yes | Yes |
UIBar.destroy() | Bar removed from DOM | No | Yes |
hide() when you want the bar invisible but still occupying its layout space. Use stow() when you want the bar collapsed but togglable by the player. Use destroy() when building a fully custom interface that has no use for the default sidebar.