PlatformView
PlatformView names a platform view type and supplies a structured PlatformPayload of creation or update properties.
Declare properties and events
Section titled “Declare properties and events”PlatformView("video_player", PlatformPayload{ {"source", std::string("intro.mp4")}, {"autoplay", true},}).Events<PlaybackChanged>()The matching PlatformModule owns native creation, property updates, events, placement, and disposal. .Events<Keys...>() declares typed platform event keys; handlers still attach with the normal .On<Key>(...) API.
Follow native composition limits
Section titled “Follow native composition limits”Platform views participate in HuxerUI measurement and placement but retain platform-native rendering and input limitations. Composition capabilities vary by backend; avoid assuming arbitrary transforms, path clipping, or cross-surface blending without checking the platform guide.
PlatformView(std::string type, PlatformPayload properties = {}).Events<Keys...>()declares dispatchable event types whose event signature, name, and payload decoder satisfy the platform event contract.- Common size, layout, semantics, and event modifiers apply where supported.
See PlatformModule for registering factories and PlatformView guide for backend constraints.

