Vue NativeVue Native
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
Guide
Components
Composables
Navigation
  • iOS
  • Android
  • macOS
GitHub
  • Layout

    • VView
    • VScrollView
    • VSafeArea
    • VKeyboardAvoiding
  • Text & Input

    • VText
    • VInput
  • Interactive

    • VButton
    • VPressable
    • VSwitch
    • VSlider
    • VSegmentedControl
    • VCheckbox
    • VRadio
    • VDropdown
    • VRefreshControl
  • Media

    • VImage
    • VWebView
    • VVideo
  • Lists

    • VList
    • VFlatList
    • VSectionList
  • Feedback

    • VActivityIndicator
    • VProgressBar
    • VAlertDialog
    • VActionSheet
    • VModal
    • VErrorBoundary
  • Transition & State

    • VTransition & VTransitionGroup
    • KeepAlive
    • VSuspense
  • Navigation

    • VNavigationBar
    • VTabBar
  • System

    • VStatusBar
    • VPicker
  • macOS

    • VToolbar
    • VSplitView
    • VOutlineView

VInput

Text input field. Maps to UITextField (single-line) or UITextView (multiline) on iOS, and EditText on Android. Supports v-model for two-way binding.

Usage

<script setup>
import { ref } from '@thelacanians/vue-native-runtime'
const text = ref('')
</script>

<template>
  <VInput
    v-model="text"
    placeholder="Type something..."
    :style="{ borderWidth: 1, borderColor: '#ccc', borderRadius: 8, padding: 12 }"
  />
</template>

Props

PropTypeDefaultDescription
modelValue / v-modelstring''Input value
placeholderstring--Placeholder text
keyboardTypeKeyboardType'default'Keyboard type
secureTextEntrybooleanfalsePassword field (hides text)
autoCapitalize'none' | 'sentences' | 'words' | 'characters''sentences'Auto-capitalization
autoCorrectbooleantrueAuto-correction
returnKeyType'done' | 'go' | 'next' | 'search' | 'send''done'Return key label
multilinebooleanfalseMulti-line text input (uses UITextView on iOS)
maxLengthnumber--Maximum character count
styleStyleProp--Layout + appearance styles
accessibilityLabelstring--Accessible description
accessibilityRolestring--Accessibility role
accessibilityHintstring--Additional accessibility context
accessibilityStateobject--Accessibility state

keyboardType values

ValueDescription
'default'Standard keyboard
'numeric'Number pad
'email-address'Email keyboard
'phone-pad'Phone dialer
'decimal-pad'Decimal number pad
'url'URL keyboard

Events

EventPayloadDescription
@update:modelValuestringText changed (used by v-model)
@focus--Input focused
@blur--Input unfocused
@submitstringReturn key pressed

Example

<script setup>
import { ref } from '@thelacanians/vue-native-runtime'

const username = ref('')
const password = ref('')
const bio = ref('')
</script>

<template>
  <VView :style="styles.container">
    <VInput
      v-model="username"
      placeholder="Username"
      autoCapitalize="none"
      autoCorrect="false"
      :style="styles.input"
      @submit="() => {}"
    />

    <VInput
      v-model="password"
      placeholder="Password"
      :secureTextEntry="true"
      returnKeyType="done"
      :style="styles.input"
    />

    <VInput
      v-model="bio"
      placeholder="Tell us about yourself..."
      :multiline="true"
      :maxLength="200"
      :style="[styles.input, { height: 100 }]"
    />
  </VView>
</template>

<script>
import { createStyleSheet } from '@thelacanians/vue-native-runtime'

const styles = createStyleSheet({
  container: {
    flex: 1,
    padding: 20,
    gap: 12,
  },
  input: {
    borderWidth: 1,
    borderColor: '#ccc',
    borderRadius: 8,
    padding: 12,
    fontSize: 16,
  },
})
</script>
Edit this page
Last Updated: 2/28/26, 11:24 PM
Contributors: Abdul Hamid, Claude Opus 4.6
Prev
VText