API
Core functions and utilities for building and displaying UI.
Functions
render(root, player, screen)— Entry point for all UI. Displays a component tree to a player.createContext(defaultValue)— Create a context object for passing values down the component tree without prop drilling.
Advanced
- Custom Native Components — register your own native component
typethat the runtime serializes and your resource pack's JSON UI decodes. Requires JSON UI and serialization knowledge.
Screen Descriptors
Screen.Scroll— Default scrolling form layout; scrolls when content overflows and shows no scrollbar when it fits. (Currently the only built-in screen type; the descriptor system is kept for future types.)
Next Steps
- Components - Built-in components that you can use in your JSX
- Hooks - Add state and effects to your components