Composables

Composables

Reference for every composable Vy UI exports, covering app-level helpers, i18n, and the low-level primitives for building your own components.

Vy UI exports composables from two packages. @vyui/kit has a handful of app-facing helpers you'll reach for directly. @vyui/core has those plus a set of primitive-authoring utilities that mirror Radix Vue / Reka UI's own exports, which most app code never touches directly.

App composables

From @vyui/kit:

Device & host

From @vyui/core come the seams between the bundle and the native container. Sparkling handles most integration for you; see the native host integration guide if you need to wire up your own host.

  • useSafeArea returns normalized notch, Dynamic Island, and home-indicator insets.
  • useGlobalEvent subscribes to native-to-JS global events with cleanup.
  • getViewportSize reports the LynxView's size in logical px.

Internationalization

From @vyui/core. See i18n composables for the short version, or the full i18n page for the complete story.

Building custom primitives

Advanced. These are for authoring your own headless component on top of @vyui/core, not for typical app-building with Vy* components, so skip this section unless you're building a primitive.
@vyui/core has more composables under the hood powering its own gesture, animation, and focus internals. They aren't part of the public API surface and aren't documented here.

Pick a composable from the sidebar to get started.