--- title: TextUI --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; ## lib.showTextUI Show the TextUI window. **DO NOT** run this every tick, it's intended to be used as a toggle. ```lua lib.showTextUI(text, options) ``` ```ts import lib from '@overextended/ox_lib/client' lib.showTextUI(text, options) ``` * text: `string` * options?: `table` * position?: `'right-center'` or `'left-center'` or `'top-center'` * Default: `'right-center'` * icon?: `string` or `table` (`array`) * iconColor?: `string` * style?: React.CSSProperties ### Usage Example ### Basic ```lua lib.showTextUI('[E] - Fuel vehicle') ``` ```ts import lib from '@overextended/ox_lib/client' lib.showTextUI('[E] - Fuel vehicle') ``` ![basic_example](https://i.imgur.com/3ptQyAq.png) ### Custom styling ```lua lib.showTextUI('[E] - Pick apple', { position = "top-center", icon = 'hand', style = { borderRadius = 0, backgroundColor = '#48BB78', color = 'white' } }) ``` ```ts import lib from '@overextended/ox_lib/client' lib.showTextUI('[E] - Pick apple', { position: "top-center", icon: 'hand', style: { borderRadius: 0, backgroundColor: '#48BB78', color: 'white' } }) ``` ![custom_example](https://i.imgur.com/gNDwPBN.png) ### lib.hideTextUI Hides the currently visible TextUI window ```lua lib.hideTextUI() ``` ```ts import lib from '@overextended/ox_lib/client' lib.hideTextUI() ```