Your first screen
The example fits in a single component. Type into the native input and Vue updates a label in the same window.
vue
<script setup lang="ts">
import { ref } from '@vue/runtime-core'
import { View, Text, TextInput } from '@rafaelaugusto/nitroui-vue'
const name = ref('')
</script>
<template>
<View :layout="{ flexGrow: 1, padding: 28, gap: 16, justifyContent: 'center' }">
<Text :fontSize="30">{{ name ? `Hello, ${name}!` : 'Hello, Vue!' }}</Text>
<TextInput v-model="name" placeholder="Your name" :layout="{ height: 48 }" />
</View>
</template>Follow one edit
- The native control sends the complete text to its change listener.
TextInputemitsupdate:modelValue. Thev-modelbinding assigns that string toname.- Vue reevaluates the text slot and the renderer sets the native label's text.
- NitroUI measures the updated content and applies its layout.
Try initializing name with your own name. Both the label and the field will use it on the first render. Clearing the field brings back the fallback greeting.
Register the screen
The example imports the compiled component and registers it once. NitroUI calls its root factory when a window scene opens.
ts
import { registerApp } from '@rafaelaugusto/nitroui-vue'
import App from './App.generated'
// NitroUI's bundler doesn't expose custom defines. Select Vue's runtime defaults for this app.
Object.assign(globalThis, {
__VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: false,
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
})
registerApp(App)On iOS and Android
Both captures show the example after typing Rafa into the native text field. The iOS app ran in Release on an iPhone 17 simulator. The Android app ran in Debug on a Pixel 7 emulator with API 36.

