Base GPUI A GPUI-native port of Base UI's rich, headless component APIs.
Base GPUI ports Base UI's rich component API surface to GPUI: compound parts, controlled and uncontrolled state, keyboard interaction, state-aware styling, and accessibility semantics. Components are unstyled, so applications retain complete control over their visual design.
The public API follows Base UI where its concepts map cleanly to native applications, while the implementation is designed specifically for GPUI's immediate-mode rendering model.
Important Base GPUI is under active development. APIs may change before version 1.0. Install it from GitHub, as is common for projects using GPUI's actively developed Git revision.
Installation
[ dependencies ] base-gpui = { git = " https://github.com/LukeTandjung/base-gpui " } gpui = { git = " https://github.com/zed-industries/zed " , rev = " 1d029c5ff5654fb1b1e8caf4462993c8ee13a133 " }
Usage
Initialize Base GPUI when your application starts:
use gpui :: { App , Application } ; fn main ( ) { Application :: new ( ) . run ( | cx : & mut App | { base_gpui :: init ( cx ) ; // Open your application window. } ) ; }
Components expose compound parts and state-aware styling. For example, tabs are composed from TabsRoot , TabsList , TabsTab , TabsIndicator , and TabsPanel rather than a single pre-styled widget.
... continue reading