Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shadownrx/windows/llms.txt
Use this file to discover all available pages before exploring further.
useUI manages the visibility state of the floating system panels that overlay the desktop — the Start Menu, the Widgets panel, and the Desktop Switcher overlay. It is a lightweight context dedicated entirely to open/closed state, keeping panel visibility logic cleanly separated from window management and system settings.
Import
Properties
true when the Start Menu panel is currently rendered and visible. Use this to style the Start button in the taskbar with an active/pressed indicator.true when the Widgets panel is slid into view on the left side of the screen. The Widgets panel contains WeatherWidget, NewsWidget, and StocksWidget.true when the Desktop Switcher overlay is visible. This overlay provides quick navigation between virtual desktops and is distinct from the full Task View (Win+Tab) managed through useSettings.Methods
toggleStart
FlipsisStartOpen between true and false. Bound to the Start button in Taskbar.tsx. No parameters required.
closeStart
Force-closes the Start Menu by settingisStartOpen to false. Use this to dismiss the Start Menu when the user clicks outside of it or opens another panel.
toggleWidgets
FlipsisWidgetsOpen between true and false. No parameters required.
closeWidgets
Force-closes the Widgets panel by settingisWidgetsOpen to false. No parameters required.
Usage Example
Panel Overview
| Panel | State property | Toggle method | Close method |
|---|---|---|---|
| Start Menu | isStartOpen | toggleStart() | closeStart() |
| Widgets | isWidgetsOpen | toggleWidgets() | closeWidgets() |
| Desktop Switcher | isDesktopSwitcherOpen | — | — |
useUI is designed exclusively for system panel visibility — it has no knowledge of windows or applications. For opening, closing, minimizing, or focusing app windows, use useWindowManager instead.useUI must be called inside a component that is a descendant of UIProvider. Calling it outside the provider tree will throw a context error.