UISet library. Explore 20 interactive panels showcasing buttons, sliders, controls, dropdowns, text input, dialogs, tooltips, navigation, theming, and layout patterns.TextTileButton gridsSpatialTheme and custom color schemesUISet components: buttons, sliders, switches, dropdowns, text fields, and dialogsUISetSample project in Android Studio. Build the project and deploy it to your Quest device using the standard Android deployment workflow. For detailed build instructions and prerequisites, see the README in the sample repository.UISet components or layout patterns.| Panel type | Description |
|---|---|
Buttons | 10 button variants: primary, secondary, borderless, destructive, with text/icon/circle styles |
Controls | Switches, checkboxes, and radio buttons |
Sliders | Large, medium, and small slider variants |
Dropdowns | Dropdown menus with selectable items |
Input | Text fields with validation states and search bars |
Dialogs | Basic and icon-based dialog components |
Tooltips | Tooltip content formatting |
Navigation | Side navigation items |
Theme selector | Runtime theme switching between dark, light, and custom color schemes |
Patterns | 8 app layout templates: 3 Horizon OS patterns with side navigation and content grids, a video player UI, and 4 custom grid layouts |
PanelRegistry.kt creates each PanelRegistration with enableTransparent = true and includeGlass = false. This configuration removes the default panel background, allowing the Compose UI to render directly in space.PanelNavigator to control which panels are visible. When you select a navigation button in NavigationView.kt, the navigator queries the ECS scene for entities with matching panel IDs and toggles their Visible component. This pattern demonstrates efficient panel management by toggling visibility instead of recreating panel registrations.ThemeHolder, a mutable state singleton. The UISetSampleTheme composable wraps SpatialTheme and reads from ThemeHolder.theme to apply the active color scheme. When you change the theme in ThemeSelectorView, all panels update immediately because they observe the same global state.SpatialColorScheme and overriding specific colors:val custom = darkSpatialColorScheme().copy(
primaryButton = Color(0xFFA000D3),
panel = Brush.verticalGradient(listOf(Color(0xFF53005E), Color(0xFF35003C))),
)
LookAtHead component and LookAtHeadSystem to position panels facing the user’s head. The system queries for entities with the LookAtHead component, retrieves the head pose from PlayerBodyAttachmentSystem, and updates each entity’s transform to face the head position. This pattern shows how to extend the Spatial SDK ECS with custom components and systems.UISet library provides spatial-optimized Compose components styled for mixed reality. Each component follows Horizon OS design patterns with built-in states, animations, and accessibility. The sample demonstrates every component variant with interactive examples. Components use SpatialTheme for automatic color scheme support. For detailed component documentation, see UISet overview.PanelRegistry, and adding a navigation item in NavigationItems.kt.SpatialColorScheme and adding it to the theme selector.LookAtHeadSystem to position panels at fixed positions in the user’s view space instead of world space.